summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dec9e32)
raw | patch | inline | side by side (parent: dec9e32)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 4 Jan 2019 19:58:38 +0000 (22:58 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 4 Jan 2019 19:58:38 +0000 (22:58 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 8628d4a436e982b1027ae5048d86465a732b305b..3d1b927b6f7f78bea422f0cf7a480dead5133473 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
// find next weapon to switch onto
cwi := curlidx;
- for i := 0 to High(weaponOrder) do
+ for i := 0 to High(FWeapon) do
begin
- cwi := (cwi+length(weaponOrder)+1) mod length(weaponOrder);
+ cwi := (cwi+length(FWeapon)+1) mod length(FWeapon);
if (cwi = curlidx) then continue; // skip current weapon
if not wantThisWeapon[cwi] then continue;
rwidx := weaponOrder[cwi];
if (rwidx < 0) then continue;
- //e_WriteLog(Format(' trying logical %d (real %d); has=%d, hasammo=%d', [cwi, rwidx, Integer(FWeapon[rwidx]), Integer(hasAmmoForWeapon(rwidx))]), TMsgType.Warning);
+ //e_WriteLog(Format(' trying logical %d (real %d)', [cwi, rwidx]), TMsgType.Warning);
if FWeapon[rwidx] and ((wwc = 1) or hasAmmoForWeapon(rwidx)) then
begin
//e_WriteLog(' I FOUND HER!', TMsgType.Warning);