From: Rudolf Polzer Date: Thu, 29 Dec 2011 14:18:44 +0000 (+0100) Subject: now allow it to be targeted too X-Git-Tag: xonotic-v0.6.0~74^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f096096af6163d99e81554a4d4406f359dd021b9;p=xonotic%2Fxonotic-data.pk3dir.git now allow it to be targeted too --- diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 0f9d14cf7..ab121045b 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -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; }