From: travi$ Date: Sun, 27 Mar 2022 16:11:46 +0000 (+0300) Subject: weapbest: skip empty X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=0787142e3ce216473e2197c82e4088ac41031fce weapbest: skip empty --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 1945f94..f67884f 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -2036,7 +2036,7 @@ var begin testedWeap := FCurrWeap; for i := WP_FIRST to WP_LAST do - if FWeapon[i] and (FWeapPreferences[i] > FWeapPreferences[testedWeap]) then + if FWeapon[i] and maySwitch(i) and (FWeapPreferences[i] > FWeapPreferences[testedWeap]) then testedWeap := i; if (R_BERSERK in FRulez) and (FWeapPreferences[WP_LAST + 1] > FWeapPreferences[testedWeap]) then testedWeap := WEAPON_KASTET;