From: TimePath Date: Sun, 22 May 2016 11:42:34 +0000 (+1000) Subject: Remove unused trigger_touch X-Git-Tag: xonotic-v0.8.2~898 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=afb64a6464e74357bc69ac3386818917601a2ef4;p=xonotic%2Fxonotic-data.pk3dir.git Remove unused trigger_touch --- diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index f28834710..e0c62c043 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -447,10 +447,6 @@ void door_spawnfield(vector fmins, vector fmaxs) 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'); @@ -782,13 +778,6 @@ spawnfunc(func_door) #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(); @@ -828,9 +817,6 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew) 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); diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index ba8a817ef..51c2ac8cc 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -28,12 +28,6 @@ void plat_spawn_inside_trigger() 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); diff --git a/qcsrc/common/triggers/trigger/impulse.qc b/qcsrc/common/triggers/trigger/impulse.qc index 02c253eb7..112516901 100644 --- a/qcsrc/common/triggers/trigger/impulse.qc +++ b/qcsrc/common/triggers/trigger/impulse.qc @@ -229,8 +229,6 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_IMPULSE, bool isnew) 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; } diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index f8283b19c..474afb213 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -447,9 +447,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew) 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); diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index e436f2cb1..b3e6a5b09 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -192,9 +192,6 @@ NET_HANDLE(ENT_CLIENT_KEYLOCK, bool isnew) 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 diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index 4666b71b7..f32a5199f 100644 --- a/qcsrc/common/triggers/trigger/teleport.qc +++ b/qcsrc/common/triggers/trigger/teleport.qc @@ -114,9 +114,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew) 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); diff --git a/qcsrc/common/triggers/triggers.qc b/qcsrc/common/triggers/triggers.qc index fbf8ae59f..617fcd402 100644 --- a/qcsrc/common/triggers/triggers.qc +++ b/qcsrc/common/triggers/triggers.qc @@ -280,34 +280,3 @@ void SUB_UseTargets_self() {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 diff --git a/qcsrc/common/triggers/triggers.qh b/qcsrc/common/triggers/triggers.qh index 915e04866..5e24781e6 100644 --- a/qcsrc/common/triggers/triggers.qh +++ b/qcsrc/common/triggers/triggers.qh @@ -8,8 +8,6 @@ const float SF_TRIGGER_RESET = 4; 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