diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index 490a728ee45f0573e80c7b97e0a8634ede139226..c3d822480045e29454919fe9c3c5e9cb9f4609f3 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
implementation
uses
+{$IFDEF USE_NANOGL}
+ nanoGL,
+{$ELSE}
+ GL,
+{$ENDIF}
e_texture, g_basic, g_map, g_game, g_gfx, e_graphics, g_weapons, g_triggers,
- g_console, g_language, g_monsters, g_player, g_grid, e_log, GL, geom, utils, xstreams;
+ g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams;
const
PANEL_SIGNATURE = $4C4E4150; // 'PANL'
(FTextureIDs[FCurTexture].AnTex <> nil) and
(Width > 0) and (Height > 0) and (FAlpha < 255) then
begin
- FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames);
+ FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames - 1);
FCurFrameCount := Count;
FTextureIDs[FCurTexture].AnTex.CurrentFrame := FCurFrame;
FTextureIDs[FCurTexture].AnTex.CurrentCounter := FCurFrameCount;