summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbedc3e)
raw | patch | inline | side by side (parent: fbedc3e)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 4 May 2019 23:54:17 +0000 (02:54 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sat, 4 May 2019 23:54:17 +0000 (02:54 +0300) |
src/game/g_triggers.pas | patch | blob | history |
index af000f0dda34bff1a628859e0ba878dd6d129ad0..174b47e6594ca44e0a0429705ebb039b4394af67 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
begin
MH_SEND_GameStats();
if p.FClientID >= 0 then
- MH_SEND_GameEvent(NET_EV_SECRET, p.UID, '', p.FClientID);
+ MH_SEND_GameEvent(NET_EV_SECRET, p.UID, '');
end;
end;
end;
for k := 1 to tgcMonsCount do
begin
if (actType = ACTIVATE_CUSTOM) and (tgcDelay > 0) then
- SpawnCooldown := tgcDelay;
+ SpawnCooldown := -1; // Çàäåðæêà âûñòàâèòñÿ ìîíñòðîì ïðè óíè÷òîæåíèè
if (tgcMax > 0) and (SpawnedCount >= tgcMax) then
Break;
gMonstersSpawned[High(gMonstersSpawned)] := mon.UID;
end;
- if tgcMax > 0 then
- begin
- mon.SpawnTrigger := ID;
- Inc(SpawnedCount);
- end;
+ mon.SpawnTrigger := ID;
+ if tgcMax > 0 then Inc(SpawnedCount);
case tgcEffect of
EFFECT_TELEPORT: begin
for k := 1 to tgcItemCount do
begin
if (actType = ACTIVATE_CUSTOM) and (tgcDelay > 0) then
- SpawnCooldown := tgcDelay;
+ SpawnCooldown := -1; // Çàäåðæêà âûñòàâèòñÿ èòåìîì ïðè óíè÷òîæåíèè
if (tgcMax > 0) and (SpawnedCount >= tgcMax) then
Break;
Result := True;
- if tgcMax > 0 then
- begin
- it := g_Items_ByIdx(iid);
- it.SpawnTrigger := ID;
- Inc(SpawnedCount);
- end;
+ it := g_Items_ByIdx(iid);
+ it.SpawnTrigger := ID;
+ if tgcMax > 0 then Inc(SpawnedCount);
case tgcEffect of
EFFECT_TELEPORT: begin
procedure g_Triggers_DecreaseSpawner(ID: DWORD);
begin
if (gTriggers <> nil) then
- if gTriggers[ID].SpawnedCount > 0 then
- Dec(gTriggers[ID].SpawnedCount);
+ begin
+ if gTriggers[ID].tgcMax > 0 then
+ begin
+ if gTriggers[ID].SpawnedCount > 0 then
+ Dec(gTriggers[ID].SpawnedCount);
+ end;
+ if gTriggers[ID].tgcDelay > 0 then
+ begin
+ if gTriggers[ID].SpawnCooldown < 0 then
+ gTriggers[ID].SpawnCooldown := gTriggers[ID].tgcDelay;
+ end;
+ end;
end;
-
procedure g_Triggers_Free ();
var
a: Integer;