From: DeaDDooMER Date: Wed, 13 Apr 2022 18:21:23 +0000 (+0300) Subject: corpses: use TAnimState for player corpses X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=7560f14665e8d85ebfde506115d47733343d5f25;p=d2df-sdl.git corpses: use TAnimState for player corpses --- 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);