From: Ketmar Dark Date: Sun, 6 Aug 2017 12:53:27 +0000 (+0300) Subject: cosmetic fix in weapon queue updating (for bots, mostly) X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=04bc45557ab59249811e35b810d1d875ff14713b;p=d2df-sdl.git cosmetic fix in weapon queue updating (for bots, mostly) --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index bfba263..5430ba7 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -1272,9 +1272,16 @@ begin for i := 0 to High(gPlayers) do if gPlayers[i] <> nil then begin - gPlayers[i].RealizeCurrentWeapon(); - if gPlayers[i] is TPlayer then gPlayers[i].Update() - else TBot(gPlayers[i]).Update(); + if gPlayers[i] is TPlayer then + begin + gPlayers[i].Update(); + gPlayers[i].RealizeCurrentWeapon(); // WARNING! DO NOT MOVE THIS INTO `Update()`! + end + else + begin + // bot updates weapons in `UpdateCombat()` + TBot(gPlayers[i]).Update(); + end; end; end; @@ -6526,6 +6533,10 @@ begin begin UpdateMove(); UpdateCombat(); + end + else + begin + RealizeCurrentWeapon(); end; end;