index cf039ba3913cddd0cc29331efe034f57377e3861..6e57873ec65f20e77deee928e1b1b7730f5e74c5 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
triggers := gCurrentMap['trigger'];
if (triggers = nil) then raise Exception.Create('LOAD: map has no triggers');
if (mapidx < 0) or (mapidx >= triggers.count) then raise Exception.Create('LOAD: invalid map trigger index');
- Trigger.trigData := triggers.item[mapidx];
+ Trigger.trigData := triggers.itemAt[mapidx];
if (Trigger.trigData = nil) then raise Exception.Create('LOAD: internal error in trigger loader');
Trigger.mapId := Trigger.trigData.id;
Trigger.mapIndex := mapidx;
TRIGGER_OFF: pan.movingActive := false;
TRIGGER_ONOFF: pan.movingActive := not pan.movingActive;
end;
+ if not trigData.trigSilent and (Length(trigData.trigSound) > 0) then
+ begin
+ g_Sound_PlayExAt(trigData.trigSound, X, Y);
+ if g_Game_IsServer and g_Game_IsNet then MH_SEND_Sound(X, Y, trigData.trigSound);
+ end;
end;
// Âûáèðàåì îäèí èç òðèããåðîâ äëÿ ðàñøèðèòåëÿ, åñëè âêëþ÷åí ðàíäîì: