X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_triggers.pas;h=1c8a586126ee9f15517ffba8d288b0245aa7254b;hb=3f758d569aeb250474aece9c4051f05ad7362805;hp=1b52a64a1d25d68d0776d4062df24daf61d04517;hpb=b39f879ac1eb4bf4b7782c4b2fc3f83bd5f99816;p=d2df-sdl.git diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 1b52a64..1c8a586 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -2128,7 +2128,7 @@ begin 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 @@ -2465,9 +2465,17 @@ 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; // Âûáèðàåì îäèí èç òðèããåðîâ äëÿ ðàñøèðèòåëÿ, åñëè âêëþ÷åí ðàíäîì: