if (!IS_DEAD(toucher))
if (toucher.triggerhealtime < time)
{
- EXACTTRIGGER_TOUCH(this, toucher);
+ bool is_trigger = !boolean(!this.nottargeted && this.targetname != "");
+ if(is_trigger)
+ EXACTTRIGGER_TOUCH(this, toucher);
toucher.triggerhealtime = time + 1;
if (toucher.health < this.max_health)
}
}
+void trigger_heal_use(entity this, entity actor, entity trigger)
+{
+ trigger_heal_touch(this, actor);
+}
+
spawnfunc(trigger_heal)
{
this.active = ACTIVE_ACTIVE;
this.noise = "misc/mediumhealth.wav";
precache_sound(this.noise);
}
+
+spawnfunc(target_heal)
+{
+ this.active = ACTIVE_ACTIVE;
+ this.use = trigger_heal_use;
+ if (!this.health)
+ this.health = 10;
+ if (!this.max_health)
+ this.max_health = 200; //Max health topoff for field
+ if(this.noise == "")
+ this.noise = "misc/mediumhealth.wav";
+ precache_sound(this.noise);
+}
#endif