]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clear out a macro from trigger_common_read
authorMario <mario@smbclan.net>
Wed, 7 Mar 2018 01:56:11 +0000 (11:56 +1000)
committerMario <mario@smbclan.net>
Wed, 7 Mar 2018 01:56:27 +0000 (11:56 +1000)
qcsrc/common/triggers/triggers.qc

index fbd20c84011596a6bd110e9f96e51f270413e4b8..f7287212ade9ca721895d3357b2df4942c405c4e 100644 (file)
@@ -125,20 +125,12 @@ void trigger_common_read(entity this, bool withtarget)
 
                int targbits = ReadByte();
 
-               #define X(xs,b) MACRO_BEGIN { \
-                       if(targbits & BIT(b)) \
-                               xs = strzone(ReadString()); \
-                       else \
-                               xs = string_null; \
-               } MACRO_END
-
-               X(this.target, 0);
-               X(this.target2, 1);
-               X(this.target3, 2);
-               X(this.target4, 3);
-               X(this.targetname, 4);
-               X(this.killtarget, 5);
-               #undef X
+               this.target = ((targbits & BIT(0)) ? strzone(ReadString()) : string_null);
+               this.target2 = ((targbits & BIT(1)) ? strzone(ReadString()) : string_null);
+               this.target3 = ((targbits & BIT(2)) ? strzone(ReadString()) : string_null);
+               this.target4 = ((targbits & BIT(3)) ? strzone(ReadString()) : string_null);
+               this.targetname = ((targbits & BIT(4)) ? strzone(ReadString()) : string_null);
+               this.killtarget = ((targbits & BIT(5)) ? strzone(ReadString()) : string_null);
        }
 
        if(f & 4)