From: terencehill Date: Thu, 10 Feb 2022 22:19:52 +0000 (+0100) Subject: Fix 2 typos in mutators.cfg, slightly optimize the SetSpectatee code X-Git-Tag: xonotic-v0.8.5~203 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=010db995cb7428a50fda4bdc9a76cc0dd720863d;p=xonotic%2Fxonotic-data.pk3dir.git Fix 2 typos in mutators.cfg, slightly optimize the SetSpectatee code --- diff --git a/mutators.cfg b/mutators.cfg index ac965a2e1..8949ed8b8 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -160,7 +160,7 @@ set g_touchexplode_force 300 // ================ // super spectate // ================ -set g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followstshield or followfc [red|blue] will transfer spectation to the relevent player, if any" +set g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followshield or followfc [red|blue] will transfer spectation to the relevent player, if any" // ================== @@ -263,7 +263,7 @@ set g_nades_ice_teamcheck 0 "Don't freeze teammates" set g_nades_spawn_count 3 "Number of times player will spawn at their spawn nade explosion location" // Heal (6) -set g_nades_heal_time 5 "How long the heling field will last" +set g_nades_heal_time 5 "How long the healing field will last" set g_nades_heal_rate 30 "Health given per second" set g_nades_heal_friend 1 "Multiplier of health given to team mates" set g_nades_heal_foe -2 "Multiplier of health given to enemies" diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 7592d1160..daabb84c9 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1839,18 +1839,18 @@ void SetSpectatee(entity this, entity spectatee) old_spectatee.(weaponentity).arc_beam.SendFlags |= ARC_SF_SETTINGS; } } - if(this.enemy) + if(spectatee) { for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; - if(this.enemy.(weaponentity).arc_beam) - this.enemy.(weaponentity).arc_beam.SendFlags |= ARC_SF_SETTINGS; + if(spectatee.(weaponentity).arc_beam) + spectatee.(weaponentity).arc_beam.SendFlags |= ARC_SF_SETTINGS; } } - if (this.enemy) - SetSpectatee_status(this, etof(this.enemy)); + if (spectatee) + SetSpectatee_status(this, etof(spectatee)); // needed to update spectator list if(old_spectatee) { ClientData_Touch(old_spectatee); }