]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/mortar.qc
Weapons: use bitflags for fire modes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / mortar.qc
index c1995745816ba1d7059743728ab81244d8f06309..d788e7b8855c58e1237e3b4f701461150ce1aede 100644 (file)
@@ -334,12 +334,12 @@ void W_Mortar_Attack2(Weapon thiswep)
                        wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime))));
                        wepinfo_ter_dps = 0;
                        */
-               METHOD(Mortar, wr_think, void(entity thiswep, entity actor, bool fire1, bool fire2))
+               METHOD(Mortar, wr_think, void(entity thiswep, entity actor, int fire))
                {
                        if(autocvar_g_balance_mortar_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo))) { // forced reload
                                Weapon w = get_weaponinfo(actor.weapon);
                                w.wr_reload(w);
-                       } else if(fire1)
+                       } else if(fire & 1)
                        {
                                if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR_PRI(mortar, refire)))
                                {
@@ -347,7 +347,7 @@ void W_Mortar_Attack2(Weapon thiswep)
                                        weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(mortar, animtime), w_ready);
                                }
                        }
-                       else if(fire2)
+                       else if(fire & 2)
                        {
                                if(WEP_CVAR_SEC(mortar, remote_detonateprimary))
                                {