From: Mario Date: Wed, 7 Mar 2018 01:56:11 +0000 (+1000) Subject: Clear out a macro from trigger_common_read X-Git-Tag: xonotic-v0.8.5~2248 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2a540887258c21adb7ce877886fd977e3cbcc0de;p=xonotic%2Fxonotic-data.pk3dir.git Clear out a macro from trigger_common_read --- diff --git a/qcsrc/common/triggers/triggers.qc b/qcsrc/common/triggers/triggers.qc index fbd20c840..f7287212a 100644 --- a/qcsrc/common/triggers/triggers.qc +++ b/qcsrc/common/triggers/triggers.qc @@ -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)