X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Fheal.qc;h=b110d9913fd97baa5b1d628b69c78fd173d32578;hb=8e69041898af22d651b6416745431cbaab84b0d5;hp=94abd4041d3d1ff9a1a6f24f5a7db8284819244e;hpb=9e50112561ad6f4cefe6d13bd7185f5dfd1ada4b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/heal.qc b/qcsrc/common/mapobjects/trigger/heal.qc index 94abd4041..b110d9913 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, GetResource(this, RES_HEALTH), this.max_health); + bool healed = Heal(toucher, this, this.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(!GetResource(this, RES_HEALTH)) - SetResourceExplicit(this, RES_HEALTH, 10); // TODO: use a special field for this, it doesn't have actual health! + if(!this.health) + this.health = 10; if(!this.max_health) this.max_health = 200; // max health topoff for field if(this.noise == "")