diff --git a/src/game/g_items.pas b/src/game/g_items.pas
index 88a9cba1c433057f3ede53d4bf118ad43aecbc9c..0aa9d560ab9b00cd002fbca4ac994b9f80a76ede 100644 (file)
--- a/src/game/g_items.pas
+++ b/src/game/g_items.pas
Obj: TObj;
Animation: TAnimation;
dropped: Boolean; // dropped from the monster? drops should be rendered after corpses, so zombie corpse will not obscure ammo container, for example
+ NeedSend: Boolean;
procedure positionChanged (); //WARNING! call this after monster position was changed, or coldet will not work right!
// ////////////////////////////////////////////////////////////////////////// //
procedure TItem.positionChanged ();
begin
+ NeedSend := NeedSend or (Obj.X <> Obj.oldX) or (Obj.Y <> Obj.oldY);
end;
it.alive := False;
it.SpawnTrigger := -1;
it.ItemType := ITEM_NONE;
+ it.NeedSend := false;
freeIds.release(LongWord(idx));
end;
it.alive := false;
it.SpawnTrigger := -1;
it.Respawnable := false;
+ it.NeedSend := false;
//if not freeIds.hasFree[LongWord(i)] then raise Exception.Create('internal error in item idx manager');
end;
end;
it.alive := True;
it.QuietRespawn := False;
it.dropped := false;
+ it.NeedSend := 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];
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);