before_script:
- - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces
- - cd darkplaces && make sv-debug -j $(nproc)
- - cd ..
- - export ENGINE="$PWD/darkplaces/darkplaces-dedicated -xonotic"
+ - ln -s $PWD data/xonotic-data.pk3dir
- git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc
- - cd gmqcc && make -j $(nproc)
+ - cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc"
- cd ..
- - export QCC="$PWD/gmqcc/gmqcc"
-
- - ln -s $PWD data/xonotic-data.pk3dir
-
-test_compilation_units:
- stage: test
- script:
- - ./qcsrc/tools/compilationunits.sh
-
-test_sv_unit:
- stage: test
- script:
- - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
- - make
- - while read line; do
- echo $line;
- if [[ $line == "All tests OK" ]]; then exit 0; fi;
- done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
- - exit 1
test_sv_game:
stage: test
script:
+ - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces
+ - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic"
+ - cd ..
+
- wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
- make
- EXPECT=8573348372f9b9f82183b01598950eb5
- test "$HASH" == "$EXPECT"
- exit $?
+test_sv_unit:
+ stage: test
+ script:
+ - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces
+ - cd darkplaces && make sv-debug -j $(nproc) && export ENGINE="$PWD/darkplaces-dedicated -xonotic"
+ - cd ..
+
+ - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
+ - make
+ - while read line; do
+ echo $line;
+ if [[ $line == "All tests OK" ]]; then exit 0; fi;
+ done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
+ - exit 1
+
+test_compilation_units:
+ stage: test
+ script:
+ - ./qcsrc/tools/compilationunits.sh
+
doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
stage: deploy
script:
if (Ban_MaybeEnforceBanOnce(this)) return;
assert(!IS_CLIENT(this), return);
assert(player_count >= 0, player_count = 0);
- TRANSMUTE(Client, this);
#ifdef WATERMARK
Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_WATERMARK, WATERMARK);
#endif
this.version_nagtime = time + 10 + random() * 10;
+ TRANSMUTE(Client, this);
// identify the right forced team
if (autocvar_g_campaign)
}
if (!teamplay && this.team_forced > 0) this.team_forced = 0;
- JoinBestTeam(this, false, false); // if the team number is valid, keep it
-
+ {
+ int id = this.playerid;
+ this.playerid = 0; // silent
+ JoinBestTeam(this, false, false); // if the team number is valid, keep it
+ this.playerid = id;
+ }
if (autocvar_sv_spectate || autocvar_g_campaign || this.team_forced < 0) {
TRANSMUTE(Observer, this);
} else {
// custom
- ATTRIB(Client, flags, int, 0)
- ATTRIB(Client, playerid, int, 0)
+ ATTRIB(Client, flags, int, this.flags)
+ ATTRIB(Client, playerid, int, this.playerid)
METHOD(Client, m_unwind, bool(Client this));