From: travi$ Date: Sat, 26 Mar 2022 18:04:47 +0000 (+0300) Subject: Fix empty switching X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=888edf84e9dcca93ffd056846e492942c1a18e38;p=d2df-sdl.git Fix empty switching --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 8f43310..f80d721 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -2043,9 +2043,11 @@ function TPlayer.maySwitch(Weapon: Byte) : Boolean; begin result := true; if (Weapon = WEAPON_KASTET) and (FSkipFist <> 0) then + begin if (FSkipFist = 1) and (not (R_BERSERK in FRulez)) then - result := false - else if (FSwitchToEmpty = 0) and not hasAmmoForWeapon(Weapon) then + result := false; + end + else if (FSwitchToEmpty = 0) and (not hasAmmoForWeapon(Weapon)) then result := false end;