diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index c95c271c289aff596bbc6b0b5b9f33750b09e7be..0268c097b672b950344e3342b9d5e441152ec8ca 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
implementation
uses
-{$IFDEF USE_NANOGL}
- nanoGL,
-{$ELSE}
- GL,
-{$ENDIF}
+ {$INCLUDE ../nogl/noGLuses.inc}
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, geom, utils, xstreams;
(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;