X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=e8891a06467dffaf806ba96cb96dabc9dbe824b1;hb=d0936017ccb8a078d1b03f55478af284bb015bbc;hp=55057b622a11f6b54475ee9d4265d580a7312097;hpb=36fd4e713dc3cc0d54fd94085af17a77f5078e11;p=d2df-sdl.git diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 55057b6..e8891a0 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -19,7 +19,7 @@ interface uses SysUtils, Variants, Classes, - MAPDEF, e_graphics, g_basic, g_sound, + MAPDEF, g_basic, g_sound, xdynrec, hashtable, exoma; type @@ -105,7 +105,7 @@ uses 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 @@ -1349,17 +1349,13 @@ begin 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; @@ -2599,8 +2595,9 @@ var 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