X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=174b47e6594ca44e0a0429705ebb039b4394af67;hp=9f6df9f5ded1502c244836da3a402ad20c3c76b9;hb=ba8cb4548eeab44bfe9c6db0081de5a9ac9600dd;hpb=ba69b47c522858ed70d450d1fec26933472c080b diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 9f6df9f..174b47e 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -809,7 +809,7 @@ begin TRIGGER_SHOT_FLAME: begin g_Weapon_flame(wx, wy, dx, dy, 0, -1, True); - //snd := 'SOUND_WEAPON_FIREPLASMA'; + snd := 'SOUND_GAME_BURNING'; end; else exit; @@ -853,7 +853,7 @@ begin dx += Random(tgcAccuracy)-Random(tgcAccuracy); dy += Random(tgcAccuracy)-Random(tgcAccuracy); - tr_SpawnShot(tgcShotType, wx, wy, dx, dy, not tgcQuiet, TargetUID); + tr_SpawnShot(tgcShotType, wx, wy, dx, dy, tgcShotSound, TargetUID); end else begin @@ -1352,9 +1352,15 @@ begin Result := True; if gLMSRespawn = LMS_RESPAWN_NONE then begin - g_Player_Get(ActivateUID).GetSecret(); + p := g_Player_Get(ActivateUID); + p.GetSecret(); Inc(gCoopSecretsFound); - if g_Game_IsNet then MH_SEND_GameStats(); + if g_Game_IsNet then + begin + MH_SEND_GameStats(); + if p.FClientID >= 0 then + MH_SEND_GameEvent(NET_EV_SECRET, p.UID, ''); + end; end; end; @@ -1467,7 +1473,7 @@ begin 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; @@ -1497,11 +1503,8 @@ begin 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 @@ -1582,7 +1585,7 @@ 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; @@ -1591,12 +1594,9 @@ begin 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 @@ -3068,11 +3068,20 @@ end; 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;