From 7560f14665e8d85ebfde506115d47733343d5f25 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Wed, 13 Apr 2022 21:21:23 +0300 Subject: [PATCH] corpses: use TAnimState for player corpses --- src/game/g_corpses.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game/g_corpses.pas b/src/game/g_corpses.pas index 3f08d79..8869e8a 100644 --- a/src/game/g_corpses.pas +++ b/src/game/g_corpses.pas @@ -247,7 +247,7 @@ implementation end; procedure TCorpse.LoadState (st: TStream); - var anim, blending: Boolean; r, g, b, alpha: Byte; stub: TAnimationState; + var anim, blending: Boolean; r, g, b, alpha: Byte; stub: TAnimState; begin assert(st <> nil); @@ -267,7 +267,7 @@ implementation Obj_LoadState(@FObj, st); FPlayerUID := utils.readWord(st); // animation - stub := TAnimationState.Create(False, 0, 0); + stub := TAnimState.Create(False, 0, 0); anim := utils.readBool(st); if anim then begin @@ -282,7 +282,6 @@ implementation // animation for mask (same as animation, compat with older saves) anim := utils.readBool(st); if anim then stub.LoadState(st, alpha, blending); - stub.Free; end; procedure g_Corpses_SetMax (Count: Word); -- 2.29.2