]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix 2 typos in mutators.cfg, slightly optimize the SetSpectatee code
authorterencehill <piuntn@gmail.com>
Thu, 10 Feb 2022 22:19:52 +0000 (23:19 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 10 Feb 2022 22:19:52 +0000 (23:19 +0100)
mutators.cfg
qcsrc/server/client.qc

index ac965a2e1b313b0b5bedb8369cc53327e152a0bc..8949ed8b8ba3eb987a5cb89f5cc6f2d88e0e00d8 100644 (file)
@@ -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"
index 7592d11609e4c89e6115e05c1bfdce54ddc684bb..daabb84c9cc9e9ee10bb6a4371cd73d4d39185f6 100644 (file)
@@ -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); }