+#include "hurt.qh"
#ifdef SVQC
void trigger_hurt_use(entity this, entity actor, entity trigger)
{
return;
if(this.team)
- if(((this.spawnflags & 4) == 0) == (this.team != toucher.team))
+ if(((this.spawnflags & INVERT_TEAMS) == 0) == (this.team != toucher.team))
return;
// only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
this.enemy = NULL; // I still hate you all
}
- Damage (toucher, this, own, this.dmg, DEATH_HURTTRIGGER.m_id, toucher.origin, '0 0 0');
+ Damage (toucher, this, own, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, toucher.origin, '0 0 0');
}
}
else if(toucher.damagedbytriggers)
if(toucher.takedamage)
{
EXACTTRIGGER_TOUCH(this, toucher);
- Damage(toucher, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, toucher.origin, '0 0 0');
+ Damage(toucher, this, this, this.dmg, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, toucher.origin, '0 0 0');
}
}
/*QUAKED spawnfunc_trigger_hurt (.5 .5 .5) ?
Any object touching this will be hurt
set dmg to damage amount
-defalt dmg = 5
+default dmg = 1000
*/
.entity trigger_hurt_next;
entity trigger_hurt_last;
trigger_hurt_last = this;
}
-float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
+bool tracebox_hits_trigger_hurt(vector start, vector min, vector max, vector end)
{
entity th;
for(th = trigger_hurt_first; th; th = th.trigger_hurt_next)
- if(tracebox_hits_box(start, mi, ma, end, th.absmin, th.absmax))
+ if(tracebox_hits_box(start, min, max, end, th.absmin, th.absmax))
return true;
return false;