void conveyor_think()
-{
+{SELFPARAM();
#ifdef CSQC
// TODO: check if this is what is causing the glitchiness when switching between them
float dt = time - self.move_time;
#ifdef SVQC
void conveyor_use()
-{
+{SELFPARAM();
self.state = !self.state;
self.SendFlags |= 2;
}
void conveyor_reset()
-{
+{SELFPARAM();
self.state = (self.spawnflags & 1);
self.SendFlags |= 2;
}
-bool conveyor_send(entity to, int sf)
+bool conveyor_send(entity this, entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_CONVEYOR);
WriteByte(MSG_ENTITY, sf);
}
void conveyor_init()
-{
+{SELFPARAM();
if (!self.speed)
self.speed = 200;
self.movedir = self.movedir * self.speed;
self.SendFlags |= 1;
}
-void spawnfunc_trigger_conveyor()
+spawnfunc(trigger_conveyor)
{
SetMovedir();
EXACTTRIGGER_INIT;
conveyor_init();
}
-void spawnfunc_func_conveyor()
+spawnfunc(func_conveyor)
{
SetMovedir();
InitMovingBrushTrigger();
#elif defined(CSQC)
+void conveyor_draw(entity this) { WITH(entity, self, this, conveyor_think()); }
+
void conveyor_init()
-{
- self.draw = conveyor_think;
+{SELFPARAM();
+ self.draw = conveyor_draw;
self.drawmask = MASK_NORMAL;
self.movetype = MOVETYPE_NONE;
}
void ent_conveyor()
-{
+{SELFPARAM();
float sf = ReadByte();
if(sf & 1)