f *= 2;
}
}
-
+.float last_spawn_time;
void Spawn_Draw(void)
{
pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 2', bound(0, frametime, 0.1));
void Ent_ReadSpawnPoint(float is_new)
{
- self.team = ReadByte();
- self.origin_x = ReadShort();
- self.origin_y = ReadShort();
- self.origin_z = ReadShort();
+ float sendflag = ReadByte();
+
+ if(sendflag & 1)
+ {
+ self.team = ReadByte();
+ self.origin_x = ReadShort();
+ self.origin_y = ReadShort();
+ self.origin_z = ReadShort();
+ }
+ if(sendflag & 2)
+ {
+ self.last_spawn_time = ReadLong();
+ }
+
+ if(self.last_spawn_time) { pointparticles(particleeffectnum("fireball_muzzleflash"), self.origin, '0 0 2', 1); self.last_spawn_time = 0; }
+
self.colormod = '200 0 0'; //colormapPaletteColor(self.team - 1, FALSE);
+
+.float last_spawn_time;
+.float send_spawn;
float Spawn_Send(entity to, float sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
void Spawn_Think(void)
{
- self.nextthink = 0;
if(self.send_spawn < 0)
{
+ self.send_spawn = 0;
self.SendFlags |= 1;
}
else
{
self.last_spawn_time = self.send_spawn;
+ self.send_spawn = 0;
self.SendFlags |= 2;
}
}
e.solid = SOLID_TRIGGER;
}
+ self.send_spawn = -1;
self.think = Spawn_Think;
self.nextthink = time;