.float triggerhurttime;
void trigger_hurt_touch()
{
- if (self.active != ACTIVE_ACTIVE)
+ if (self.active != ACTIVE_ACTIVE)
return;
if(self.team)
.float triggerhealtime;
void trigger_heal_touch()
{
- if (self.active != ACTIVE_ACTIVE)
+ if (self.active != ACTIVE_ACTIVE)
return;
-
+
// only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
if (other.iscreature)
{
{
EXACTTRIGGER_TOUCH;
other.triggerhealtime = time + 1;
-
+
if (other.health < self.max_health)
{
other.health = min(other.health + self.health, self.max_health);
void spawnfunc_trigger_heal()
{
self.active = ACTIVE_ACTIVE;
-
+
EXACTTRIGGER_INIT;
self.touch = trigger_heal_touch;
if (!self.health)
setmodel(self, self.model);
if(self.noise != "")
precache_sound (self.noise);
-
+
if(!self.bgmscriptsustain)
self.bgmscriptsustain = 1;
else if(self.bgmscriptsustain < 0)
float pushdeltatime;
float str;
- if (self.active != ACTIVE_ACTIVE)
+ if (self.active != ACTIVE_ACTIVE)
return;
if (!isPushable(other))
{
float pushdeltatime;
- if (self.active != ACTIVE_ACTIVE)
+ if (self.active != ACTIVE_ACTIVE)
return;
if (!isPushable(other))
float pushdeltatime;
float str;
- if (self.active != ACTIVE_ACTIVE)
+ if (self.active != ACTIVE_ACTIVE)
return;
if (!isPushable(other))
// added after this message
// wait: average time between messages
// delay: initial delay before the first message
-
+
float i, n;
self.use = target_voicescript_use;
if(ear.spawnflags & 8)
return msgin;
}
-
+
matchstart = -1;
l = strlen(ear.message);
void relay_activators_use()
{
entity trg, os;
-
+
os = self;
-
+
for(trg = world; (trg = find(trg, targetname, os.target)); )
{
self = trg;
if(os.cnt == ACTIVE_TOGGLE)
if(trg.active == ACTIVE_ACTIVE)
trg.active = ACTIVE_NOT;
- else
+ else
trg.active = ACTIVE_ACTIVE;
else
trg.active = os.cnt;
- }
+ }
}
self = os;
}
void spawnfunc_relay_deactivate()
{
self.cnt = ACTIVE_NOT;
- self.use = relay_activators_use;
+ self.use = relay_activators_use;
}
void spawnfunc_relay_activatetoggle()
{
self.cnt = ACTIVE_TOGGLE;
- self.use = relay_activators_use;
+ self.use = relay_activators_use;
}
.string chmap, gametype;