From 92655287ffab368ec7bf450fa3d82fb2328a7b99 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Mon, 10 Feb 2020 01:24:51 +0300 Subject: [PATCH] fix weaponstay when item respawn is off --- src/game/g_items.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/g_items.pas b/src/game/g_items.pas index 07c4df2..ae047f8 100644 --- a/src/game/g_items.pas +++ b/src/game/g_items.pas @@ -453,10 +453,7 @@ begin it.slotIsUsed := true; it.ItemType := ItemType; - 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.Respawnable := Respawnable; it.InitX := X; it.InitY := Y; it.RespawnTime := 0; @@ -512,6 +509,7 @@ var Anim: TAnimation; m: Word; r, nxt: Boolean; + actualRespawnable: Boolean; begin if (ggItems = nil) then exit; @@ -579,7 +577,9 @@ begin // Íàäî óáðàòü ñ êàðòû, åñëè ýòî íå êëþ÷, êîòîðûì íóæíî ïîäåëèòüñÿ ñ äðóãèì èãðîêîì if r then begin - if not Respawnable then g_Items_Remove(i) else g_Items_Pick(i); + actualRespawnable := Respawnable + and ((ITEM_RESPAWNTIME > 0) and LongBool(gGameSettings.Options and GAME_OPTION_RESPAWNITEMS)); + if not actualRespawnable then g_Items_Remove(i) else g_Items_Pick(i); if g_Game_IsNet then MH_SEND_ItemDestroy(False, i); nxt := True; break; -- 2.29.2