]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
audit some .think use
authorRudolf Polzer <divverent@xonotic.org>
Mon, 24 Dec 2012 10:13:39 +0000 (11:13 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 24 Dec 2012 10:13:39 +0000 (11:13 +0100)
qcsrc/server/g_subs.qc
qcsrc/server/g_triggers.qc
qcsrc/server/t_plats.qc

index 6c43c985f38b869a22c7e6f33bde7c847685ad60..fd34e9ee17436cf9a3392b958372fabcd2edc7b2 100644 (file)
@@ -1,5 +1,4 @@
-float SUB_True() { return 1; }
-float SUB_False() { return 0; }
+void SUB_NullThink(void) { }
 
 void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
 void()  SUB_CalcMoveDone;
@@ -279,7 +278,7 @@ void SUB_CalcMove_Bezier (vector tcontrol, vector tdest, float tspeed, void() fu
        controller.think1 = self.think;
 
        // the thinking is now done by the controller
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
        self.nextthink = self.ltime + traveltime;
        
        // invoke controller
index 10a78fb99dfe0230943211b4f259c47f7a7f2185..bf473fabbb57405c87f8e2b4b11a247da4dc51dd 100644 (file)
@@ -255,6 +255,7 @@ void multi_reset()
                self.solid = SOLID_BBOX;
        }
        self.think = func_null;
+       self.nextthink = 0;
        self.team = self.team_saved;
 }
 
@@ -360,6 +361,7 @@ void delay_use()
 void delay_reset()
 {
        self.think = func_null;
+       self.nextthink = 0:
 }
 
 void spawnfunc_trigger_delay()
index d7a3b29ce24e40ea9dfc68ca564b8488f9c6d619..7c21c4e2e396158ffa18f8e46a639fe82ce8e7e3 100644 (file)
@@ -414,7 +414,7 @@ void spawnfunc_func_rotating()
 
        // wait for targets to spawn
        self.nextthink = self.ltime + 999999999;
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
 
        // TODO make a reset function for this one
 }
@@ -495,7 +495,7 @@ void spawnfunc_func_bobbing()
        controller.nextthink = time + 1;
        controller.think = func_bobbing_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;
@@ -572,7 +572,7 @@ void spawnfunc_func_pendulum()
        controller.nextthink = time + 1;
        controller.think = func_pendulum_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
 
        //self.effects |= EF_LOWPRECISION;
 
@@ -1389,6 +1389,7 @@ void door_reset()
        self.velocity = '0 0 0';
        self.state = STATE_BOTTOM;
        self.think = func_null;
+       self.nextthink = 0;
 }
 
 // spawnflags require key (for now only func_door)
@@ -1501,6 +1502,7 @@ void door_rotating_reset()
        self.avelocity = '0 0 0';
        self.state = STATE_BOTTOM;
        self.think = func_null;
+       self.nextthink = 0;
 }
 
 void door_rotating_init_startopen()
@@ -1770,6 +1772,7 @@ void secret_reset()
        }
        setorigin(self, self.oldorigin);
        self.think = func_null;
+       self.nextthink = 0;
 }
 
 /*QUAKED spawnfunc_func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
@@ -1909,7 +1912,7 @@ void spawnfunc_func_fourier()
        controller.nextthink = time + 1;
        controller.think = func_fourier_controller_think;
        self.nextthink = self.ltime + 999999999;
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;
@@ -2065,7 +2068,7 @@ void spawnfunc_func_vectormamamam()
 
        // wait for targets to spawn
        self.nextthink = self.ltime + 999999999;
-       self.think = func_null;
+       self.think = SUB_NullThink; // for PushMove
 
        // Savage: Reduce bandwith, critical on e.g. nexdm02
        self.effects |= EF_LOWPRECISION;