]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
sed IFTARGETED
authorMartin Taibr <taibr.martin@gmail.com>
Sat, 23 Sep 2017 04:30:12 +0000 (06:30 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Sat, 23 Sep 2017 04:30:12 +0000 (06:30 +0200)
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/door_secret.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/misc/teleport_dest.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/target/speaker.qc
qcsrc/common/triggers/trigger/gravity.qc
qcsrc/common/triggers/trigger/multivibrator.qc
qcsrc/common/triggers/triggers.qh

index 6adbcc65f4fa4d7dc2564b466f473008f8d90042..960ee2150d6e666f6434e392d5a0a6f3ad02c3b7 100644 (file)
@@ -119,7 +119,7 @@ void conveyor_init(entity this)
        this.movedir *= this.speed;
        setthink(this, conveyor_think);
        this.nextthink = time;
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                this.use = conveyor_use;
                this.reset = conveyor_reset;
index dc0be6ae24a9822b67865e2c4a2cb0c6b0b32c6b..1add9f593f227bc15d974b594d4f52167dffaec6 100644 (file)
@@ -506,7 +506,7 @@ void LinkDoors(entity this)
 
                if (this.health)
                        return;
-               IFTARGETED
+               if(THIS_TARGETED)
                        return;
                if (this.items)
                        return;
@@ -574,7 +574,7 @@ void LinkDoors(entity this)
 
        if (this.health)
                return;
-       IFTARGETED
+       if(THIS_TARGETED)
                return;
        if (this.items)
                return;
index 0bad196abf3a57a79a4fbac2637170f35321bdf6..671f7048aab18bac8e0eaff61f6265dff4489117 100644 (file)
@@ -220,7 +220,7 @@ spawnfunc(func_door_secret)
        setblocked(this, secret_blocked);
        this.speed = 50;
        this.use = fd_secret_use;
-       IFTARGETED
+       if(THIS_TARGETED)
        {
        }
        else
index a0773f249a82ccfe6bc52f0fac17cb063381cbd6..3676550d61703311978ec43a10ef8e9c6e5697c6 100644 (file)
@@ -136,7 +136,7 @@ spawnfunc(func_pointparticles)
 
        Net_LinkEntity(this, (this.spawnflags & 4), 0, pointparticles_SendEntity);
 
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                this.use = pointparticles_use;
                this.reset = pointparticles_reset;
index 2059a8126d53101672aec3410e6560e8812d2891..e4fd43c1a20d33dd41f49bf723a8f673a64db68c 100644 (file)
@@ -241,7 +241,7 @@ spawnfunc(misc_laser)
 
        Net_LinkEntity(this, false, 0, laser_SendEntity);
 
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                this.reset = laser_reset;
                this.reset(this);
index fc3cec863a26920d0547df1143e75af283631f88..6e23a88bab31fecf6f10f284f230de2781e4381d 100644 (file)
@@ -41,7 +41,7 @@ spawnfunc(info_teleport_destination)
        //setorigin(this, this.origin + '0 0 27');      // To fix a mappers' habit as old as Quake
        setorigin(this, this.origin);
 
-       IFTARGETED
+       if(THIS_TARGETED)
        {
        }
        else
index 09e733000f21dc4582627f670a766af704545de8..703f1d05cc85cfab637ed976ef0b1878e8f75f4d 100644 (file)
@@ -177,7 +177,7 @@ void plat_use(entity this, entity actor, entity trigger)
 
 void plat_reset(entity this)
 {
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                setorigin(this, this.pos1);
                this.state = 4;
index af327b443bc21febb1c8494829bfd10e1fb4543a..355ba16c9ec83e0cf45ab6861ff785de2c26f70b 100644 (file)
@@ -85,7 +85,7 @@ spawnfunc(target_speaker)
 
        if(!this.atten && !(this.spawnflags & 4))
        {
-               IFTARGETED
+               if(THIS_TARGETED)
                        this.atten = ATTEN_NORM;
                else
                        this.atten = ATTEN_STATIC;
@@ -96,7 +96,7 @@ spawnfunc(target_speaker)
        if(!this.volume)
                this.volume = 1;
 
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                if(this.spawnflags & 8) // ACTIVATOR
                        this.use = target_speaker_use_activator;
index 3ea1562f084a93e4c73b7fdb0c9a26ac64dad90e..4112dbdb158b7f31c2e148b5c65aaa1e7abf8b5c 100644 (file)
@@ -97,7 +97,7 @@ spawnfunc(trigger_gravity)
                precache_sound(this.noise);
 
        this.state = true;
-       IFTARGETED
+       if(THIS_TARGETED)
        {
                this.use = trigger_gravity_use;
                if(this.spawnflags & 2)
index d946efe5f17cc533c2b104b52fb1dc2c2e37ba82..6bf0557f2203dc4c49da9ce6741de8368792e10e 100644 (file)
@@ -72,7 +72,7 @@ spawnfunc(trigger_multivibrator)
        setthink(this, multivibrator_send_think);
        this.nextthink = max(1, time);
 
-       IFTARGETED
+       if(THIS_TARGETED)
                multivibrator_reset(this);
 }
 #endif
index 2b8274f4b890aa473b5432de2415bb1719e925a1..56ebb0c381e91750f35e719a60c7c00c8524297e 100644 (file)
@@ -14,8 +14,10 @@ const float  SPAWNFLAG_NOTOUCH = 1;
 
 .float height;
 
+// we love double negation around here
+// TODO check why grep doesn't find any assignments to it
 .float nottargeted;
-#define IFTARGETED if(!this.nottargeted && this.targetname != "")
+#define THIS_TARGETED !this.nottargeted && this.targetname != ""
 
 .float lip;