it.sameteam = false;
}
bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);
- if (!it.csqcmodel_isdead || it.alpha > 0)
+ if ((!it.csqcmodel_isdead || it.alpha > 0) && entcs.origin != it.origin)
setorigin(it, entcs.origin);
it.csqcmodel_isdead = dead;
Draw_ShowNames(it);
{
STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + this.ticrate * this.revive_speed, 1);
SetResourceExplicit(this, RES_HEALTH, max(1, STAT(REVIVE_PROGRESS, this) * this.max_health));
- this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
+ if (this.iceblock)
+ this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
if(!(this.spawnflags & MONSTERFLAG_INVINCIBLE) && this.sprite)
WaypointSprite_UpdateHealth(this.sprite, GetResource(this, RES_HEALTH));
{
STAT(REVIVE_PROGRESS, this) = bound(0, STAT(REVIVE_PROGRESS, this) + frametime * this.revive_speed, 1);
SetResourceExplicit(this, RES_HEALTH, max(1, STAT(REVIVE_PROGRESS, this) * start_health));
- this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
+ if (this.iceblock)
+ this.iceblock.alpha = bound(0.2, 1 - STAT(REVIVE_PROGRESS, this), 1);
if (STAT(REVIVE_PROGRESS, this) >= 1)
Unfreeze(this, false);
delete(this);
return;
}
- setorigin(this, this.owner.origin - '0 0 16');
+ vector ice_org = this.owner.origin - '0 0 16';
+ if (this.origin != ice_org)
+ setorigin(this, ice_org);
this.nextthink = time;
}
entity ice = new(ice);
ice.owner = targ;
ice.scale = targ.scale;
+ // set_movetype(ice, MOVETYPE_FOLLOW) would rotate the ice model with the player
setthink(ice, Ice_Think);
ice.nextthink = time;
ice.frame = floor(random() * 21); // ice model has 20 different looking frames