trigger.owner = self;
#ifdef SVQC
settouch(trigger, door_trigger_touch);
-#elif defined(CSQC)
- trigger.trigger_touch = door_trigger_touch;
- trigger.draw = trigger_draw_generic;
- trigger.drawmask = MASK_NORMAL;
#endif
setsize (trigger, t1 - '60 60 8', t2 + '60 60 8');
#elif defined(CSQC)
-void door_draw(entity this)
-{
- Movetype_Physics_NoMatchServer(this);
-
- trigger_draw_generic(this);
-}
-
NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
{
int sf = ReadByte();
this.solid = SOLID_BSP;
this.movetype = MOVETYPE_PUSH;
- this.trigger_touch = door_touch;
- this.draw = door_draw;
- this.drawmask = MASK_NORMAL;
this.use = door_use;
LinkDoors(this);
trigger.solid = SOLID_TRIGGER;
trigger.enemy = self;
-#ifdef CSQC
- trigger.drawmask = MASK_NORMAL;
- trigger.trigger_touch = plat_center_touch;
- trigger.draw = trigger_draw_generic;
-#endif
-
tmin = self.absmin + '25 25 0';
tmax = self.absmax - '25 25 -8';
tmin_z = tmax_z - (self.pos1_z - self.pos2_z + 8);
this.classname = "trigger_impulse";
this.solid = SOLID_TRIGGER;
this.entremove = trigger_remove_generic;
- //this.draw = trigger_draw_generic;
- this.drawmask = MASK_NORMAL;
this.move_time = time;
if(this.radius) { this.move_touch = trigger_impulse_touch3; }
this.entremove = trigger_remove_generic;
this.solid = SOLID_TRIGGER;
- //this.draw = trigger_draw_generic;
this.move_touch = trigger_push_touch;
- this.drawmask = MASK_NORMAL;
this.move_time = time;
defer(this, 0.25, trigger_push_findtarget);
return = true;
this.classname = "trigger_keylock";
- this.drawmask = MASK_NORMAL;
- this.draw = trigger_draw_generic;
- this.trigger_touch = trigger_keylock_touch;
this.entremove = keylock_remove;
}
#endif
this.entremove = trigger_remove_generic;
this.solid = SOLID_TRIGGER;
- //this.draw = trigger_draw_generic;
//this.move_touch = trigger_push_touch;
- this.drawmask = MASK_NORMAL;
this.move_time = time;
defer(this, 0.25, teleport_findtarget);
{SELFPARAM();
SUB_UseTargets(this, NULL, NULL);
}
-
-#ifdef CSQC
-void trigger_touch_generic(entity this, void() touchfunc)
-{
- entity e;
- for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain)
- if(e.classname == "csqcprojectile")
- {
- vector emin = e.absmin, emax = e.absmax;
- if(this.solid == SOLID_BSP)
- {
- emin -= '1 1 1';
- emax += '1 1 1';
- }
- if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick
- if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, e)) // accurate
- {
- other = e;
- WITHSELF(this, touchfunc());
- }
- }
-}
-void trigger_draw_generic(entity this)
-{
- float dt = time - this.move_time;
- this.move_time = time;
- if(dt <= 0) { return; }
-
- if(this.trigger_touch) { trigger_touch_generic(this, this.trigger_touch); }
-}
-#endif
const float SPAWNFLAG_NOMESSAGE = 1;
const float SPAWNFLAG_NOTOUCH = 1;
-.void() trigger_touch;
-
.bool pushable;
.float antiwall_flag; // Variable to define what to do with func_clientwall