index 529aabc4781c7520dfae7226792a581a4bce34cc..15575146d572935606c53f43d4d6367fe05866b1 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
*
* 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
// Íàíîñèì óðîí ìîíñòðó
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;
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;
// Òðèããåð "Ëîâóøêà" - ïîðà îòêðûâàòü