From: fgsfds Date: Sat, 10 Apr 2021 18:56:05 +0000 (+0300) Subject: fix interpolation of spawned items X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=3bc42852ee39fff79d1c9b66dd2a55d262a0d9f5;p=d2df-sdl.git fix interpolation of spawned items --- diff --git a/src/game/g_items.pas b/src/game/g_items.pas index 88a9cba..7331242 100644 --- a/src/game/g_items.pas +++ b/src/game/g_items.pas @@ -463,8 +463,6 @@ begin it.dropped := false; g_Obj_Init(@it.Obj); - it.Obj.oldX := X; - it.Obj.oldY := Y; it.Obj.X := X; it.Obj.Y := Y; it.Obj.Rect.Width := ITEMSIZE[ItemType][0]; @@ -485,6 +483,9 @@ begin end; end; + it.Obj.oldX := it.Obj.X; + it.Obj.oldY := it.Obj.Y; + // Óñòàíîâêà àíèìàöèè case it.ItemType of ITEM_ARMOR_GREEN: if g_Frames_Get(ID, 'FRAMES_ITEM_ARMORGREEN') then it.Animation := TAnimation.Create(ID, True, 20);