From: TimePath Date: Wed, 23 Mar 2016 03:54:26 +0000 (+1100) Subject: Fix regressions in 911f8048 X-Git-Tag: xonotic-v0.8.2~1039 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a31eac601c475a28155abbe0b25b2338ab0a8f5a;p=xonotic%2Fxonotic-data.pk3dir.git Fix regressions in 911f8048 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b04a579df..e345c88d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,35 +1,17 @@ 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 @@ -44,6 +26,26 @@ test_sv_game: - 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: diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 24d08a43c..44e1e4161 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -989,12 +989,12 @@ void ClientConnect() 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) @@ -1029,8 +1029,12 @@ void ClientConnect() } 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 { diff --git a/qcsrc/server/cl_client.qh b/qcsrc/server/cl_client.qh index 70df314ea..36f33219c 100644 --- a/qcsrc/server/cl_client.qh +++ b/qcsrc/server/cl_client.qh @@ -28,8 +28,8 @@ CLASS(Client, Object) // 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));