summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a94357)
raw | patch | inline | side by side (parent: 2a94357)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 6 Aug 2017 12:53:27 +0000 (15:53 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 6 Aug 2017 12:54:21 +0000 (15:54 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index bfba263a40cf6fb9dbd08781f419d92a7b0b1f9d..5430ba709c848c985c8d6c5ffedafe296143c09d 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
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;
begin
UpdateMove();
UpdateCombat();
+ end
+ else
+ begin
+ RealizeCurrentWeapon();
end;
end;