index 1b52a64a1d25d68d0776d4062df24daf61d04517..1c8a586126ee9f15517ffba8d288b0245aa7254b 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
Trigger.mapIndex := mapidx;
if (Trigger.trigData.trigRec <> nil) then
begin
- Trigger.trigData := Trigger.trigData.trigRec.clone();
+ Trigger.trigData := Trigger.trigData.trigRec.clone({Trigger.trigData.headerRec}nil);
end
else
begin
end;
end;
+ //HACK!
// if we have panelid, assume that it will switch the moving platform
- if (trigPanelGUID >= 0) then
+ pan := g_Map_PanelByGUID(trigPanelGUID);
+ if (pan <> nil) then
begin
+ case TriggerType of
+ TRIGGER_PRESS: pan.movingActive := true; // what to do here?
+ TRIGGER_ON: pan.movingActive := true;
+ TRIGGER_OFF: pan.movingActive := false;
+ TRIGGER_ONOFF: pan.movingActive := not pan.movingActive;
+ end;
end;
// Âûáèðàåì îäèí èç òðèããåðîâ äëÿ ðàñøèðèòåëÿ, åñëè âêëþ÷åí ðàíäîì: