]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Fix 2 typos in mutators.cfg, slightly optimize the SetSpectatee code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
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); }