2 .float triggerhealtime;
3 void trigger_heal_touch()
5 if (self.active != ACTIVE_ACTIVE)
8 // only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
13 if (other.triggerhealtime < time)
16 other.triggerhealtime = time + 1;
18 if (other.health < self.max_health)
20 other.health = min(other.health + self.health, self.max_health);
21 other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
22 _sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
28 spawnfunc(trigger_heal)
30 self.active = ACTIVE_ACTIVE;
33 self.touch = trigger_heal_touch;
37 self.max_health = 200; //Max health topoff for field
39 self.noise = "misc/mediumhealth.wav";
40 precache_sound(self.noise);