]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Merge remote branch 'origin/master' into samual/mutator_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 4f92644667b0224c8f5e3a9763bca8727d5c8ad8..ed3027a194d1fee080b12c663e37301da8729b9a 100644 (file)
@@ -328,13 +328,28 @@ entity SelectSpawnPoint (float anypoint)
        if(anypoint)
                teamcheck = -1;
        else if(have_team_spawns > 0)
-               teamcheck = self.team; // MUST be team
-       else if(have_team_spawns == 0 && have_noteam_spawns)
+       {
+               if(have_team_spawns_forteam[self.team] == 0)
+               {
+                       // we request a spawn for a team, and we have team
+                       // spawns, but that team has no spawns?
+                       if(have_team_spawns[0])
+                               // try noteam spawns
+                               teamcheck = 0;
+                       else
+                               // if not, any spawn has to do
+                               teamcheck = -1;
+               }
+               else
+                       teamcheck = self.team; // MUST be team
+       }
+       else if(have_team_spawns == 0 && have_team_spawns[0])
                teamcheck = 0; // MUST be noteam
        else
                teamcheck = -1;
                // if we get here, we either require team spawns but have none, or we require non-team spawns and have none; use any spawn then
 
+
        // get the list of players
        playerlist = findchain(classname, "player");
        // get the entire list of spots
@@ -608,7 +623,7 @@ void PutObserverInServer (void)
        }
 
        if(self.flagcarried)
-               DropFlag(self.flagcarried, world, world);
+               ctf_Handle_Drop(self); // FIXCTF
 
        if(self.ballcarried && g_nexball)
                DropBall(self.ballcarried, self.origin + self.ballcarried.origin, self.velocity);
@@ -1805,7 +1820,7 @@ void ClientDisconnect (void)
        Portal_ClearAll(self);
 
        if(self.flagcarried)
-               DropFlag(self.flagcarried, world, world);
+               ctf_Handle_Drop(self); // FIXCTF
        if(self.ballcarried && g_nexball)
                DropBall(self.ballcarried, self.origin + self.ballcarried.origin, self.velocity);
 
@@ -2609,7 +2624,7 @@ PlayerPreThink
 Called every frame for each client before the physics are run
 =============
 */
-void() ctf_setstatus;
+//void() ctf_setstatus;
 void() nexball_setstatus;
 .float items_added;
 void PlayerPreThink (void)
@@ -2891,8 +2906,8 @@ void PlayerPreThink (void)
                if (g_minstagib)
                        minstagib_ammocheck();
 
-               if(g_ctf)
-                       ctf_setstatus();
+               //if(g_ctf)
+               //      ctf_setstatus();
 
                if(g_nexball)
                        nexball_setstatus();