summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 6e01cec)
raw | patch | inline | side by side (from parent 1: 6e01cec)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 16 Feb 2023 19:10:49 +0000 (22:10 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:14:52 +0000 (12:14 +0300) |
src/game/g_panel.pas | patch | blob | history |
diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index 70d2cc15fd4ff5c1deaa801dae3e2d98aaab9e28..f259aa3d18492575f0547abf1aae34aa18ec4780 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
if (FCurTexture >= 0) then
begin
Texture := FTextureIDs[FCurTexture].Texture;
- case Textures[Texture].TextureName of
- TEXTURE_NAME_WATER: Result := DWORD(TEXTURE_SPECIAL_WATER);
- TEXTURE_NAME_ACID1: Result := DWORD(TEXTURE_SPECIAL_ACID1);
- TEXTURE_NAME_ACID2: Result := DWORD(TEXTURE_SPECIAL_ACID2);
+ if Texture >= 0 then
+ begin
+ case Textures[Texture].TextureName of (* TODO: optimize it *)
+ TEXTURE_NAME_WATER: Result := DWORD(TEXTURE_SPECIAL_WATER);
+ TEXTURE_NAME_ACID1: Result := DWORD(TEXTURE_SPECIAL_ACID1);
+ TEXTURE_NAME_ACID2: Result := DWORD(TEXTURE_SPECIAL_ACID2);
+ end
end
end
end;