]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/spawnpoints.qc
Fix the use of self, activator and other globals in .use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / spawnpoints.qc
index 51af4d16e311e4857e84e1572f2acd6acc2e8c39..31e941ad44b8c276e2007dced17cd67a0fc157d6 100644 (file)
@@ -58,12 +58,12 @@ void spawnpoint_think()
        }
 }
 
-void spawnpoint_use()
-{SELFPARAM();
+void spawnpoint_use(entity this, entity actor, entity trigger)
+{
        if(teamplay)
        if(have_team_spawns > 0)
        {
-               self.team = activator.team;
+               this.team = actor.team;
                some_spawn_has_been_used = 1;
        }
        //LOG_INFO("spawnpoint was used!\n");
@@ -102,7 +102,7 @@ void relocate_spawnpoint()
         }
     }
 
-    self.use = spawnpoint_use;
+    self.use1 = spawnpoint_use;
     self.think = spawnpoint_think;
     self.nextthink = time + 0.5 + random() * 2; // shouldn't need it for a little second
     self.team_saved = self.team;