// generic usage
const int START_ENABLED = BIT(0);
const int ON_MAPLOAD = BIT(1);
+const int INVERT_TEAMS = BIT(2);
const int NOSPLASH = BIT(8); // generic anti-splashdamage spawnflag
// triggers
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)
/*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;