From f096096af6163d99e81554a4d4406f359dd021b9 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 29 Dec 2011 15:18:44 +0100 Subject: [PATCH] now allow it to be targeted too --- qcsrc/server/t_plats.qc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) 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; } -- 2.39.2