🐛 Fix moving of items freeing the item in the process
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Andreas Schneider 2022-10-16 17:27:18 +02:00
parent 9638bb3fe2
commit 955edf8a77
1 changed files with 2 additions and 1 deletions

View File

@ -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);