]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix regressions in 911f8048
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 23 Mar 2016 03:54:26 +0000 (14:54 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 23 Mar 2016 05:38:29 +0000 (16:38 +1100)
.gitlab-ci.yml
qcsrc/server/cl_client.qc
qcsrc/server/cl_client.qh

index b04a579df7ea1048be7fe4c9e19c7f132834596b..e345c88d9f086b41b825523f6468e07919cf3cd4 100644 (file)
@@ -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:
index 24d08a43cc69c67e609824a97c91dfbeb064ac69..44e1e41617b09d41080a4271423d920b25724152 100644 (file)
@@ -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 {
index 70df314ea034655c7e71a9afca71e7b4fe0b00ff..36f33219c6d9f4cc871470a2c9122a7fbf9ca295 100644 (file)
@@ -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));