From: terencehill Date: Mon, 6 Feb 2017 18:13:01 +0000 (+0100) Subject: Split READSKILL macro in multiple lines X-Git-Tag: xonotic-v0.8.2~240 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=c33ec0612c34187c4fd58367a516729e049b23a4;p=xonotic%2Fxonotic-data.pk3dir.git Split READSKILL macro in multiple lines --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 160f8ec90..b52efbbd5 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -208,7 +208,13 @@ void bot_setnameandstuff(entity this) prio = 6; - #define READSKILL(f,w,r) if(argv(prio) != "") this.f = stof(argv(prio)) * (w); else this.f = (!autocvar_g_campaign) * (2 * random() - 1) * (r) * (w); ++prio + #define READSKILL(f, w, r) MACRO_BEGIN { \ + if(argv(prio) != "") \ + this.f = stof(argv(prio)) * w; \ + else \ + this.f = (!autocvar_g_campaign) * (2 * random() - 1) * r * w; \ + prio++; \ + } MACRO_END //print(bot_name, ": ping=", argv(9), "\n"); READSKILL(havocbot_keyboardskill, 0.5, 0.5); // keyboard skill