else if (c == 13) this.colormod = '0.10 0.10 1.73';
else this.colormod = '1 1 1';
}*/
+
void delay_respawn(entity this);
void respawn(entity this)
{
this.effects |= EF_NODRAW; // prevent another CopyBody
entity e = spawn();
e.enemy = this;
- e.count = 0;
+ e.count = time;
setthink(e, delay_respawn);
e.nextthink = time;
}
// prevent darkplaces from interpolating the respawn angle by delaying respawn by one frame
void delay_respawn(entity this)
{
- if(!this.count)
+ if(this.count <= time)
{
this.nextthink = time;
- ++this.count;
return;
}