]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unused trigger_touch
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 11:42:34 +0000 (21:42 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 22 May 2016 11:42:34 +0000 (21:42 +1000)
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/trigger/impulse.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/teleport.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/triggers/triggers.qh

index f28834710dc16a6a2296f92d16a7eb85c1c2fe9f..e0c62c043d97216e7814fd2de4e258cb6a8dc88e 100644 (file)
@@ -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);
index ba8a817ef8388f1fe4293c11c0210678f34417b4..51c2ac8cc823c89eb6ee669b83ce053c3f80eac4 100644 (file)
@@ -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);
index 02c253eb78758cebe3f9e0c40eaa98709896915b..1125169011ee6f5c25596ca7df17958f9d842b84 100644 (file)
@@ -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; }
index f8283b19cc6c85ed93591f0663b01871f67cb8a9..474afb2134acfbf4f0af39503c09cd7069908683 100644 (file)
@@ -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);
 
index e436f2cb1cf1610c63d53b0a617a98cfc2d3be8d..b3e6a5b09023d17e1284a91a22d0afdbddceacdf 100644 (file)
@@ -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
index 4666b71b7dac53cb315a4fb9fe314d68543cc18c..f32a5199f22fd4a9a462d35d229929cca5c494c5 100644 (file)
@@ -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);
 
index fbf8ae59f19adfa84e4298c3e3436fcf7209fed8..617fcd40268006bf7a0297289ec764ee42cf7601 100644 (file)
@@ -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
index 915e048666b5d2033122abf0d118e1132097e748..5e24781e696faa23ef56148cd848e746d0f341f5 100644 (file)
@@ -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