X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=1c8e0c778d77f6a573818596ff3f6d4df02d8537;hb=3af68bc5a306b013ddb2a04c24543b6ec6e288af;hp=3cfca16904004997968584ee954eefc307e92c79;hpb=414f2873efa0cce84499f64774db7000e6268971;p=d2df-sdl.git diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 3cfca16..1c8e0c7 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 @@ -103,9 +103,9 @@ implementation uses Math, - g_player, g_map, g_panel, g_gfx, g_game, g_textures, + g_player, g_map, g_panel, g_gfx, g_game, g_textures, r_textures, r_animations, 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 @@ -1224,7 +1224,7 @@ begin if not Trigger.Enabled then exit; if (Trigger.TimeOut <> 0) and (actType <> ACTIVATE_CUSTOM) then exit; - if (gLMSRespawn = LMS_RESPAWN_WARMUP) then exit; + if (gLMSRespawn > LMS_RESPAWN_NONE) then exit; if (Trigger.exoCheck <> nil) then begin @@ -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