this.tur_head.angles += dt * this.tur_head.avelocity;
- if (GetResourceAmount(this, RESOURCE_HEALTH) < 127)
+ if (GetResourceAmount(this, RES_HEALTH) < 127)
{
dt = random();
te_spark(this.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
}
- if(GetResourceAmount(this, RESOURCE_HEALTH) < 85)
+ if(GetResourceAmount(this, RES_HEALTH) < 85)
if(dt < 0.01)
pointparticles(EFFECT_SMOKE_LARGE, (this.origin + (randomvec() * 80)), '0 0 0', 1);
- if(GetResourceAmount(this, RESOURCE_HEALTH) < 32)
+ if(GetResourceAmount(this, RES_HEALTH) < 32)
if(dt < 0.015)
pointparticles(EFFECT_SMOKE_SMALL, (this.origin + (randomvec() * 80)), '0 0 0', 1);
drawhealthbar(
o,
0,
- GetResourceAmount(this, RESOURCE_HEALTH) / 255,
+ GetResourceAmount(this, RES_HEALTH) / 255,
'0 0 0',
'0 0 0',
0.5 * SPRITE_HEALTHBAR_WIDTH * t,
set_movetype(this.tur_head, MOVETYPE_NOCLIP);
set_movetype(this, MOVETYPE_NOCLIP);
this.tur_head.angles = this.angles;
- SetResourceAmount(this, RESOURCE_HEALTH, 255);
+ SetResourceAmount(this, RES_HEALTH, 255);
this.solid = SOLID_BBOX;
this.tur_head.solid = SOLID_NOT;
set_movetype(this, MOVETYPE_NOCLIP);
}
_tmp = ReadByte();
- float myhp = GetResourceAmount(this, RESOURCE_HEALTH);
+ float myhp = GetResourceAmount(this, RES_HEALTH);
if(_tmp == 0 && myhp != 0)
turret_die(this);
else if(myhp && myhp > _tmp)
else if(myhp && myhp < _tmp)
this.helpme = 0; // we're being healed, don't spam help me waypoints
- SetResourceAmount(this, RESOURCE_HEALTH, _tmp);
+ SetResourceAmount(this, RES_HEALTH, _tmp);
}
return true;
}