From: Mario Date: Mon, 24 Sep 2018 12:47:33 +0000 (+1000) Subject: Replace cases of !SAME_TEAM with DIFF_TEAM X-Git-Tag: xonotic-v0.8.5~1831 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ba2c014f1d2b6797359a1d5b63b67846c784ae2f;p=xonotic%2Fxonotic-data.pk3dir.git Replace cases of !SAME_TEAM with DIFF_TEAM --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index 4f255c19c..9cd378f0f 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -385,7 +385,7 @@ MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor) float excess = max(0, frag_damage - damage_take - damage_save); - if (frag_target != frag_attacker && IS_PLAYER(frag_attacker) && !SAME_TEAM(frag_target, frag_attacker)) + if (frag_target != frag_attacker && IS_PLAYER(frag_attacker) && DIFF_TEAM(frag_target, frag_attacker)) GameRules_scoring_add_team(frag_attacker, SCORE, (frag_damage - excess) * autocvar_g_ca_damage2score_multiplier); } diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index b7cdbf05b..9338c986c 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -423,7 +423,7 @@ void buff_Medic_Heal(entity this) { FOREACH_CLIENT(IS_PLAYER(it) && it != this && vdist(it.origin - this.origin, <=, autocvar_g_buffs_medic_heal_range), { - if (!SAME_TEAM(it, this)) + if (DIFF_TEAM(it, this)) { continue; } diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc b/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc index ee2a5be7f..fdcc4beee 100644 --- a/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc +++ b/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc @@ -90,7 +90,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) if (autocvar_g_spawn_near_teammate_ignore_spawnpoint_max && tested >= autocvar_g_spawn_near_teammate_ignore_spawnpoint_max) break; if (PHYS_INPUT_BUTTON_CHAT(it)) continue; - if (!SAME_TEAM(player, it)) continue; + if (DIFF_TEAM(player, it)) continue; if (autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health && GetResourceAmount(it, RESOURCE_HEALTH) < autocvar_g_balance_health_regenstable) continue; if (IS_DEAD(it)) continue; if (time < it.msnt_timer) continue; diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 32515c048..d8cc0dce0 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -468,7 +468,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, if (this != attacker) { float realdmg = damage - excess; - if (IS_PLAYER(attacker) && !SAME_TEAM(attacker, this)) { + if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this)) { GameRules_scoring_add(attacker, DMG, realdmg); } if (IS_PLAYER(this)) {