From cda58c4167dbaa3e9ee4136633652fb3bb5765e9 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Sun, 19 Mar 2017 08:30:08 +0000 Subject: [PATCH] Properly limit the teams a player can join --- qcsrc/server/mutators/mutator/gamemode_singleplayer.qc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_singleplayer.qc b/qcsrc/server/mutators/mutator/gamemode_singleplayer.qc index c7ba657dc..b0b9f07f4 100644 --- a/qcsrc/server/mutators/mutator/gamemode_singleplayer.qc +++ b/qcsrc/server/mutators/mutator/gamemode_singleplayer.qc @@ -71,9 +71,13 @@ MUTATOR_HOOKFUNCTION(sp, CheckAllowedTeams, CBC_ORDER_EXCLUSIVE) { ent.team_forced = NUM_TEAM_2; } - else if( IS_PLAYER(ent) ) + else if( IS_REAL_CLIENT(ent) ) { ent.team_forced = NUM_TEAM_1; + c1 = 1; + c2 = 0; + c3 = 0; + c4 = 0; } return true; } @@ -85,8 +89,8 @@ MUTATOR_HOOKFUNCTION(sp, Scores_CountFragsRemaining) MUTATOR_HOOKFUNCTION(sp, PlayerSpawn) { - entity player = M_ARGV(0, entity); - entity spawn_spot = M_ARGV(1, entity); + entity player = M_ARGV(0, entity); + entity spawn_spot = M_ARGV(1, entity); if ( IS_BOT_CLIENT(player) ) { player.can_drop_weapon = spawn_spot.can_drop_weapon; -- 2.39.2