From: terencehill Date: Tue, 16 Apr 2019 18:41:36 +0000 (+0200) Subject: Remove direct reference to a team number X-Git-Tag: xonotic-v0.8.5~1547 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b410a8e66ced17613d1b135570a3fe63e74475cb;p=xonotic%2Fxonotic-data.pk3dir.git Remove direct reference to a team number --- 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);