From 6e01cec550eeb3390d2875b4f381f1653a0c2a85 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Thu, 16 Feb 2023 22:01:18 +0300 Subject: [PATCH] gl: fix load animtextures --- src/game/renders/opengl/r_textures.pas | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/game/renders/opengl/r_textures.pas b/src/game/renders/opengl/r_textures.pas index f66708f..ec47f58 100644 --- a/src/game/renders/opengl/r_textures.pas +++ b/src/game/renders/opengl/r_textures.pas @@ -644,8 +644,8 @@ implementation end; end; - function r_Textures_LoadTextFromMemory (data: Pointer; size: LongInt; var txt: TAnimTextInfo): Boolean; - var cfg: TConfig; text: TAnimTextInfo; + function r_Textures_LoadTextFromMemory (data: Pointer; size: LongInt; var text: TAnimTextInfo): Boolean; + var cfg: TConfig; begin result := false; if data <> nil then @@ -669,11 +669,7 @@ implementation text.anim.delay := MAX(1, text.anim.delay); text.anim.frames := MAX(1, text.anim.frames); cfg.Free; - if (txt.name <> '') and (txt.w > 0) and (txt.h > 0) and (txt.anim.delay > 0) and (txt.anim.frames > 0) then - begin - txt := text; - result := true; - end; + result := (text.name <> '') and (text.w > 0) and (text.h > 0) and (text.anim.delay > 0) and (text.anim.frames > 0); end; end; end; -- 2.29.2