From b410a8e66ced17613d1b135570a3fe63e74475cb Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 16 Apr 2019 20:41:36 +0200 Subject: [PATCH] Remove direct reference to a team number --- qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc | 4 ++-- qcsrc/server/teamplay.qc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc index 14266c8a7..835073d07 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc @@ -579,7 +579,7 @@ MUTATOR_HOOKFUNCTION(as, TurretSpawn) entity turret = M_ARGV(0, entity); if(!turret.team || turret.team == FLOAT_MAX) - turret.team = 5; // this gets reversed when match starts? + turret.team = assault_attacker_team; // this gets reversed when match starts (assault_roundstart_use) } MUTATOR_HOOKFUNCTION(as, VehicleInit) @@ -626,7 +626,7 @@ MUTATOR_HOOKFUNCTION(as, ReadLevelCvars) MUTATOR_HOOKFUNCTION(as, OnEntityPreSpawn) { - entity ent = M_ARGV(0, entity); + entity ent = M_ARGV(0, entity); switch(ent.classname) { diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index c19b85fe2..f2e24a7a5 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -464,8 +464,8 @@ entity TeamBalance_CheckAllowedTeams(entity for_whom) team_ent.m_num_bots = 0; } setthink(balance, TeamBalance_Destroy); - - int teams_mask = 0; + + int teams_mask = 0; string teament_name = string_null; bool mutator_returnvalue = MUTATOR_CALLHOOK(TeamBalance_CheckAllowedTeams, teams_mask, teament_name, for_whom); -- 2.39.2