]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc
Kill the ret_string global
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / bugrigs / bugrigs.qc
index 194341383dc2d5afd8c8cdf014c907c4bc3cc418..7d7ba3939766c318b475cc2ee3843822a867b78e 100644 (file)
@@ -1,8 +1,8 @@
 #ifdef IMPLEMENTATION
 #ifdef SVQC
-       #include "../../../../server/antilag.qh"
+       #include <server/antilag.qh>
 #endif
-#include "../../../physics.qh"
+#include <common/physics/player.qh>
 
 
 #if defined(SVQC)
@@ -271,6 +271,7 @@ void RaceCarPhysics(entity this)
 #endif
 MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 {
+    SELFPARAM();
        if(!PHYS_BUGRIGS(self) || !IS_PLAYER(self)) { return false; }
 
 #ifdef SVQC
@@ -283,6 +284,9 @@ MUTATOR_HOOKFUNCTION(bugrigs, PM_Physics)
 
 MUTATOR_HOOKFUNCTION(bugrigs, PlayerPhysics)
 {
+#ifdef SVQC
+    SELFPARAM();
+#endif
        if(!PHYS_BUGRIGS(self)) { return false; }
 #ifdef SVQC
        self.bugrigs_prevangles = self.angles;
@@ -294,20 +298,19 @@ MUTATOR_HOOKFUNCTION(bugrigs, PlayerPhysics)
 
 MUTATOR_HOOKFUNCTION(bugrigs, ClientConnect)
 {
-       stuffcmd(self, "cl_cmd settemp chase_active 1\n");
-       return false;
+    entity player = M_ARGV(0, entity);
+
+       stuffcmd(player, "cl_cmd settemp chase_active 1\n");
 }
 
 MUTATOR_HOOKFUNCTION(bugrigs, BuildMutatorsString)
 {
-       ret_string = strcat(ret_string, ":bugrigs");
-       return false;
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ":bugrigs");
 }
 
 MUTATOR_HOOKFUNCTION(bugrigs, BuildMutatorsPrettyString)
 {
-       ret_string = strcat(ret_string, ", Bug rigs");
-       return false;
+       M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Bug rigs");
 }
 
 #endif