newstate = (time < cyclestart + self.wait);
- activator = self;
if(self.state != newstate)
- SUB_UseTargets();
+ SUB_UseTargets(self, self, NULL);
self.state = newstate;
if(self.state)
self.nextthink = cyclestart + self.wait + self.respawntime + 0.01;
}
-void multivibrator_toggle()
-{SELFPARAM();
- if(self.nextthink == 0)
+void multivibrator_toggle(entity this, entity actor, entity trigger)
+{
+ if(this.nextthink == 0)
{
- multivibrator_send();
+ WITHSELF(this, multivibrator_send());
}
else
{
- if(self.state)
+ if(this.state)
{
- SUB_UseTargets();
- self.state = 0;
+ SUB_UseTargets(this, actor, trigger);
+ this.state = 0;
}
- self.nextthink = 0;
+ this.nextthink = 0;
}
}
self.respawntime = self.wait;
self.state = 0;
- self.use = multivibrator_toggle;
+ self.use1 = multivibrator_toggle;
self.think = multivibrator_send;
self.nextthink = max(1, time);