.float train_wait_turning;
void() train_next;
void train_wait()
-{
- entity oldself;
- oldself = self;
- self = self.enemy;
- SUB_UseTargets();
- self = oldself;
+{SELFPARAM();
+ WITH(entity, self, self.enemy, SUB_UseTargets());
self.enemy = world;
// if turning is enabled, the train will turn toward the next point while waiting
}
void train_next()
-{
+{SELFPARAM();
entity targ, cp = world;
vector cp_org = '0 0 0';
}
if(self.noise != "")
- sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_IDLE);
+ _sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTEN_IDLE);
}
#ifdef SVQC
float train_send(entity to, float sf)
-{
+{SELFPARAM();
WriteByte(MSG_ENTITY, ENT_CLIENT_TRAIN);
WriteByte(MSG_ENTITY, sf);
void train_link()
{
- Net_LinkEntity(self, 0, false, train_send);
+ //Net_LinkEntity(self, 0, false, train_send);
}
void func_train_find()
-{
+{SELFPARAM();
entity targ;
targ = find(world, targetname, self.target);
self.target = targ.target;
*/
#ifdef SVQC
void spawnfunc_func_train()
-{
+{SELFPARAM();
if (self.noise != "")
precache_sound(self.noise);
if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
-
+
if (self.spawnflags & 2)
{
self.platmovetype_turn = true;
}
void ent_train()
-{
+{SELFPARAM();
float sf = ReadByte();
if(sf & SF_TRIGGER_INIT)
self.spawnflags = ReadByte();
self.model = strzone(ReadString());
- setmodel(self, self.model);
+ _setmodel(self, self.model);
trigger_common_read(true);