summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb372b9)
raw | patch | inline | side by side (parent: bb372b9)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Thu, 27 Feb 2020 18:48:21 +0000 (21:48 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Thu, 27 Feb 2020 18:48:21 +0000 (21:48 +0300) |
src/game/g_items.pas | patch | blob | history |
diff --git a/src/game/g_items.pas b/src/game/g_items.pas
index 200ebdd96cf725a2bc486d043e66bfce96ce46e4..8d476efe76e6fa3fc1c27f98644e2def961704b4 100644 (file)
--- a/src/game/g_items.pas
+++ b/src/game/g_items.pas
i, j, k: Integer;
ID: DWord;
Anim: TAnimation;
- m: Word;
+ m, ItemRespawnTime: Word;
r, nxt: Boolean;
begin
if (ggItems = nil) then exit;
+ // respawn items in 15 seconds regardless of settings during warmup
+ ItemRespawnTime := IfThen(gLMSRespawn = LMS_RESPAWN_NONE, gGameSettings.ItemRespawnTime, 15);
+
for i := 0 to High(ggItems) do
begin
if (ggItems[i].ItemType = ITEM_NONE) then continue;
// Íàäî óáðàòü ñ êàðòû, åñëè ýòî íå êëþ÷, êîòîðûì íóæíî ïîäåëèòüñÿ ñ äðóãèì èãðîêîì
if r then
begin
- if not (Respawnable and (gGameSettings.ItemRespawnTime > 0)) then
+ if not (Respawnable and (ItemRespawnTime > 0)) then
g_Items_Remove(i)
else
g_Items_Pick(i);
if (ID < Length(ggItems)) then
begin
ggItems[ID].alive := false;
- ggItems[ID].RespawnTime := gGameSettings.ItemRespawnTime * 36;
+ ggItems[ID].RespawnTime := IfThen(gLMSRespawn = LMS_RESPAWN_NONE, gGameSettings.ItemRespawnTime, 15) * 36;
end;
end;