From: DeaDDooMER Date: Tue, 21 Feb 2023 17:29:36 +0000 (+0300) Subject: gl: fix soul die animation offset X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d9a5bbeb1c2790fac76ed87f2212f2e68a0bd5c3;p=d2df-sdl.git gl: fix soul die animation offset --- 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;