]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
now allow it to be targeted too
authorRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 14:18:44 +0000 (15:18 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 29 Dec 2011 14:18:44 +0000 (15:18 +0100)
qcsrc/server/t_plats.qc

index 0f9d14cf73ba70de81f4df236408a3a271ecad88..ab121045b005392bdac38cfe20aacf5f953b5dd2 100644 (file)
@@ -2081,6 +2081,22 @@ void conveyor_think()
        self.nextthink = time;
 }
 
+void conveyor_use()
+{
+       if(self.nextthink)
+               self.nextthink = 0;
+       else
+               self.nextthink = time;
+}
+
+void conveyor_reset()
+{
+       if(self.spawnflags & 1)
+               self.nextthink = time;
+       else
+               self.nextthink = 0;
+}
+
 void spawnfunc_func_conveyor()
 {
        SetMovedir ();
@@ -2088,7 +2104,14 @@ void spawnfunc_func_conveyor()
                return;
        self.movetype = MOVETYPE_NONE;
        if (!self.speed)
-               self.speed = 100;
+               self.speed = 200;
        self.think = conveyor_think;
-       self.nextthink = time;
+       IFTARGETED
+       {
+               self.use = conveyor_use;
+               self.reset = conveyor_reset;
+               conveyor_reset();
+       }
+       else
+               self.nextthink = time;
 }