From d9a5bbeb1c2790fac76ed87f2212f2e68a0bd5c3 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Tue, 21 Feb 2023 20:29:36 +0300 Subject: [PATCH] gl: fix soul die animation offset --- src/game/renders/opengl/r_map.pas | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index d58daee..f27043e 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -703,7 +703,7 @@ implementation end; function r_Map_GetMonsterTexture (m, a: Integer; d: TDirection; out t: TGLMultiTexture; out dx, dy: Integer; out flip: Boolean): Boolean; - // var c: Integer; + var w: Integer; begin t := nil; dx := 0; dy := 0; flip := false; result := MonTextures[m, a, d] <> nil; @@ -728,9 +728,8 @@ implementation end; if flip then begin -// c := (MONSTERTABLE[MonsterType].Rect.X - dx) + MONSTERTABLE[MonsterType].Rect.Width; -// dx := MTABLE[m].width - c - MONSTERTABLE[MonsterType].Rect.X; - dx := -dx; + if (m = MONSTER_SOUL) and (a = ANIM_DIE) then w := 64 else w := 0; + dx := -dx - w; end; end; end; -- 2.29.2