]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Merge branch 'master' into terencehill/bot_AI_improvements
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index 16a082b9f708d4defb87d62b7b8e4e0495c2c5d1..318422153bb3423478e9f8dc980a0fea24daf5e4 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