index 55057b622a11f6b54475ee9d4265d580a7312097..e8891a06467dffaf806ba96cb96dabc9dbe824b1 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
uses
SysUtils, Variants, Classes,
- MAPDEF, e_graphics, g_basic, g_sound,
+ MAPDEF, g_basic, g_sound,
xdynrec, hashtable, exoma;
type
Math,
g_player, g_map, g_panel, g_gfx, g_game, g_textures,
g_console, g_monsters, g_items, g_phys, g_weapons,
- wadreader, g_main, e_log, g_language, e_res,
+ wadreader, e_log, g_language, e_res,
g_options, g_net, g_netmsg, utils, xparser, xstreams;
const
begin
Enabled := False;
Result := True;
- if gLMSRespawn = LMS_RESPAWN_NONE then
+ p := g_Player_Get(ActivateUID);
+ p.GetSecret();
+ Inc(gCoopSecretsFound);
+ if g_Game_IsNet then
begin
- p := g_Player_Get(ActivateUID);
- p.GetSecret();
- Inc(gCoopSecretsFound);
- if g_Game_IsNet then
- begin
- MH_SEND_GameStats();
- if p.FClientID >= 0 then
- MH_SEND_GameEvent(NET_EV_SECRET, p.UID, '');
- end;
+ MH_SEND_GameStats();
+ MH_SEND_GameEvent(NET_EV_SECRET, p.UID, '');
end;
end;
begin
if (tgMonsList = nil) then tgMonsList := TSimpleMonsterList.Create();
- if gTriggers = nil then
- Exit;
+ if gTriggers = nil then Exit;
+ if gLMSRespawn > LMS_RESPAWN_NONE then Exit; // don't update triggers at all
+
SetLength(Affected, 0);
for a := 0 to High(gTriggers) do