From 955edf8a7789687c4fc555aaa661108d8ae696a8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 16 Oct 2022 17:27:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20moving=20of=20items=20free?= =?UTF-8?q?ing=20the=20item=20in=20the=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/ULandscape.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/ULandscape.pas b/Server/ULandscape.pas index 42361e5..f9b8d50 100644 --- a/Server/ULandscape.pas +++ b/Server/ULandscape.pas @@ -824,9 +824,10 @@ begin deletePacket := TDeleteStaticPacket.Create(staticItem); movePacket := TMoveStaticPacket.Create(staticItem, newX, newY); + statics.FreeObjects := False; i := statics.IndexOf(staticItem); - statics[i] := nil; statics.Delete(i); + statics.FreeObjects := True; statics := targetBlock.Cells[(newY mod 8) * 8 + newX mod 8]; statics.Add(staticItem);