X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=15575146d572935606c53f43d4d6367fe05866b1;hb=7d53b8719f818712900fefb1c36e41b1fe9b3f32;hp=529aabc4781c7520dfae7226792a581a4bce34cc;hpb=06667349c1efd05099ff0617dfdf17dc7a097828;p=d2df-sdl.git diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 529aabc..1557514 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -2135,7 +2134,7 @@ begin // Íàíîñèì óðîí ìîíñòðó if (TriggerType = TRIGGER_DAMAGE) and (tgcAmount > 0) then begin - p.Damage(tgcAmount, 0, 0, 0, tgcKind); + m.Damage(tgcAmount, 0, 0, 0, tgcKind); if (tgcKind = HIT_FLAME) then m.CatchFire(0); end; @@ -2708,17 +2707,14 @@ begin begin if (SoundPlayCount > 0) and (not Sound.IsPlaying()) then begin - if tgcPlayCount > 0 then SoundPlayCount -= 1; // Åñëè 0 - èãðàåì çâóê áåñêîíå÷íî + if tgcPlayCount > 0 then Dec(SoundPlayCount); (* looped sound if zero *) if tgcLocal then - begin - Sound.PlayVolumeAt(X+(Width div 2), Y+(Height div 2), tgcVolume/255.0); - end + Sound.PlayVolumeAtRect(X, Y, Width, Height, tgcVolume / 255.0) else - begin - Sound.PlayPanVolume((tgcPan-127.0)/128.0, tgcVolume/255.0); - end; - if Sound.IsPlaying() and g_Game_IsNet and g_Game_IsServer then MH_SEND_TriggerSound(gTriggers[a]); - end; + Sound.PlayPanVolume((tgcPan - 127.0) / 128.0, tgcVolume / 255.0); + if Sound.IsPlaying() and g_Game_IsNet and g_Game_IsServer then + MH_SEND_TriggerSound(gTriggers[a]) + end end; // Òðèããåð "Ëîâóøêà" - ïîðà îòêðûâàòü