]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Split READSKILL macro in multiple lines
authorterencehill <piuntn@gmail.com>
Mon, 6 Feb 2017 18:13:01 +0000 (19:13 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 6 Feb 2017 18:13:01 +0000 (19:13 +0100)
qcsrc/server/bot/default/bot.qc

index 160f8ec90b4772807ee12755442d675129ff5f33..b52efbbd5c0eff353cc290e1edb5cd6f70136019 100644 (file)
@@ -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