From 95e5dc9815ded04c52a0e5fadb77580f1d6ed7c0 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Thu, 7 Sep 2017 06:50:20 +0300 Subject: [PATCH] fixed typo in trigger caching; Anower Station is REALLY working now --- src/game/g_triggers.pas | 2 +- src/shared/mapdef_tgc_impl.inc | 8 ++++---- src/tools/mapgen.dpr | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 2d19853..88e5134 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -2470,7 +2470,7 @@ begin // Îïðåäåëÿåì èçìåíÿåìûå èì òðèããåðû: for b := 0 to High(gTriggers) do begin - if g_Collide(tgctX, tgctY, tgctWidth, tgctHeight, gTriggers[b].X, gTriggers[b].Y, + if g_Collide(tgcTX, tgcTY, tgcTWidth, tgcTHeight, gTriggers[b].X, gTriggers[b].Y, gTriggers[b].Width, gTriggers[b].Height) and ((b <> a) or (tgcWait > 0)) then begin // Can be self-activated, if there is Data.Wait diff --git a/src/shared/mapdef_tgc_impl.inc b/src/shared/mapdef_tgc_impl.inc index cfd3ed2..c26709d 100644 --- a/src/shared/mapdef_tgc_impl.inc +++ b/src/shared/mapdef_tgc_impl.inc @@ -33,7 +33,7 @@ begin TRIGGER_ONOFF: begin tgt.tgcTX := tdata.trigTX; - tgt.tgcTY := tdata.trigTX; + tgt.tgcTY := tdata.trigTY; tgt.tgcTWidth := tdata.trigTWidth; tgt.tgcTHeight := tdata.trigTHeight; tgt.tgcWait := tdata.trigWait; @@ -62,7 +62,7 @@ begin TRIGGER_SPAWNMONSTER: begin tgt.tgcTX := tdata.trigTX; - tgt.tgcTY := tdata.trigTX; + tgt.tgcTY := tdata.trigTY; tgt.tgcSpawnMonsType := tdata.trigSpawnMonsType; tgt.tgcHealth := tdata.trigHealth; tgt.tgcDirection := tdata.trigDirection; @@ -76,7 +76,7 @@ begin TRIGGER_SPAWNITEM: begin tgt.tgcTX := tdata.trigTX; - tgt.tgcTY := tdata.trigTX; + tgt.tgcTY := tdata.trigTY; tgt.tgcSpawnItemType := tdata.trigSpawnItemType; tgt.tgcGravity := tdata.trigGravity; tgt.tgcDmonly := tdata.trigDmonly; @@ -126,7 +126,7 @@ begin TRIGGER_SHOT: begin tgt.tgcTX := tdata.trigTX; - tgt.tgcTY := tdata.trigTX; + tgt.tgcTY := tdata.trigTY; tgt.tgcShotType := tdata.trigShotType; tgt.tgcShotTarget := tdata.trigShotTarget; tgt.tgcQuiet := tdata.trigQuiet; diff --git a/src/tools/mapgen.dpr b/src/tools/mapgen.dpr index 8a23afa..1a48505 100644 --- a/src/tools/mapgen.dpr +++ b/src/tools/mapgen.dpr @@ -183,12 +183,12 @@ begin if fld.hasTPrefix then begin write(fo, ' tgt.tgcTX := tdata.trigTX;'#10); - write(fo, ' tgt.tgcTY := tdata.trigTX;'#10); + write(fo, ' tgt.tgcTY := tdata.trigTY;'#10); end else if fld.separatePasFields then begin write(fo, ' tgt.tgcX := tdata.trigX;'#10); - write(fo, ' tgt.tgcY := tdata.trigX;'#10); + write(fo, ' tgt.tgcY := tdata.trigY;'#10); end else begin -- 2.29.2