X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Fheal.qc;h=dd1cf4015b290548d25ec64d1c5b6360964ee5b6;hb=5d929ee0b1dc587e3154a4fa4b56e83b9ba9100b;hp=866fd88a569ddd4e67488ba23ba0a72e8ac5715f;hpb=50d6cb6a02a959a7303b5b687631b664a807b26f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/heal.qc b/qcsrc/common/mapobjects/trigger/heal.qc index 866fd88a5..dd1cf4015 100644 --- a/qcsrc/common/mapobjects/trigger/heal.qc +++ b/qcsrc/common/mapobjects/trigger/heal.qc @@ -18,7 +18,7 @@ void trigger_heal_touch(entity this, entity toucher) toucher.triggerhealtime = time + this.delay; bool playthesound = (this.spawnflags & HEAL_SOUND_ALWAYS); - bool healed = Heal(toucher, this, GetResourceAmount(this, RESOURCE_HEALTH), this.max_health); + bool healed = Heal(toucher, this, GetResource(this, RES_HEALTH), this.max_health); if(playthesound || healed) _sound (toucher, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM); @@ -36,8 +36,8 @@ void trigger_heal_init(entity this) this.active = ACTIVE_ACTIVE; if(!this.delay) this.delay = 1; - if(!GetResourceAmount(this, RESOURCE_HEALTH)) - SetResourceAmountExplicit(this, RESOURCE_HEALTH, 10); // TODO: use a special field for this, it doesn't have actual health! + if(!GetResource(this, RES_HEALTH)) + SetResource(this, RES_HEALTH, 10); // TODO: use a special field for this, it doesn't have actual health! if(!this.max_health) this.max_health = 200; // max health topoff for field if(this.noise == "")