From 2a540887258c21adb7ce877886fd977e3cbcc0de Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 7 Mar 2018 11:56:11 +1000 Subject: [PATCH] Clear out a macro from trigger_common_read --- qcsrc/common/triggers/triggers.qc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) 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) -- 2.39.2