DEADSOFTWARE

add 'respawn items' flag
[d2df-sdl.git] / src / game / g_items.pas
index 8efa5ca9fb4626cd1907e805d640db44e5153033..07c4df2b1d8e929832c6ac67b97f548de27b3d4d 100644 (file)
@@ -453,8 +453,10 @@ begin
   it.slotIsUsed := true;
 
   it.ItemType := ItemType;
-  it.Respawnable := Respawnable;
-  if g_Game_IsServer and (ITEM_RESPAWNTIME = 0) then it.Respawnable := False;
+  if g_Game_IsServer and ((ITEM_RESPAWNTIME = 0) or not LongBool(gGameSettings.Options and GAME_OPTION_RESPAWNITEMS)) then
+    it.Respawnable := False
+  else
+    it.Respawnable := Respawnable;
   it.InitX := X;
   it.InitY := Y;
   it.RespawnTime := 0;