X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fwalker.qc;h=2718b1dc48e5c2051c36dfb687e31536a44c01bf;hb=18762ba5730e68b8ecfc075e218ae9d719978383;hp=6aa0865e69d1e4fac73d93ab9177f72278071985;hpb=070ebb9d95214bf817392d9286608c812a2a7bd9;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 6aa0865e6..2718b1dc4 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -86,10 +86,10 @@ void walker_rocket_touch(entity this, entity toucher) void walker_rocket_damage(entity this, entity inflictor, entity attacker, float damage, float deathtype, .entity weaponentity, vector hitloc, vector vforce) { - TakeResource(this, RESOURCE_HEALTH, damage); + TakeResource(this, RES_HEALTH, damage); this.velocity = this.velocity + vforce; - if (GetResourceAmount(this, RESOURCE_HEALTH) <= 0) + if (GetResource(this, RES_HEALTH) <= 0) W_PrepareExplosionByDamage(this, this.owner, walker_rocket_explode); } @@ -218,7 +218,7 @@ void walker_fire_rocket(entity this, vector org) rocket.bot_dodgerating = 50; rocket.takedamage = DAMAGE_YES; rocket.damageforcescale = 2; - SetResourceAmountExplicit(rocket, RESOURCE_HEALTH, 25); + SetResourceExplicit(rocket, RES_HEALTH, 25); rocket.tur_shotorg = randomvec() * 512; rocket.cnt = time + 1; rocket.enemy = this.enemy; @@ -629,7 +629,7 @@ void walker_draw(entity this) setorigin(this, this.origin + this.velocity * dt); this.tur_head.angles += dt * this.tur_head.avelocity; - if(GetResourceAmount(this, RESOURCE_HEALTH) < 127) + if(GetResource(this, RES_HEALTH) < 127) if(random() < 0.15) te_spark(this.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16); }