From deafa0bce0b145af71067833940ecf4f12b2e880 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Mar 2016 18:01:01 +0100 Subject: [PATCH 1/2] - fixed: The 'open door in 5 minutes sector type had the order of parameters wrong, due to a bad function prototype. --- src/p_spec.cpp | 2 +- src/p_spec.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_spec.cpp b/src/p_spec.cpp index 8a8f21c50..7e14f1ec3 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -1213,7 +1213,7 @@ void P_InitSectorSpecial(sector_t *sector, int special, bool nothinkers) break; case dSector_DoorRaiseIn5Mins: - new DDoor (sector, DDoor::doorWaitRaise, 2*FRACUNIT, TICRATE*30/7, 5*60*TICRATE, 0); + new DDoor (sector, DDoor::doorWaitRaise, 2*FRACUNIT, TICRATE*30/7, 0, 5*60*TICRATE); break; case dFriction_Low: diff --git a/src/p_spec.h b/src/p_spec.h index 83a50e252..d40fb3da7 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -535,7 +535,7 @@ public: }; DDoor (sector_t *sector); - DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int topcountdown, int lightTag); + DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTag, int topcountdown); void Serialize (FArchive &arc); void Tick (); From 75bcec411eb5aef9713a6f51907be0c36df0fd78 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Mar 2016 18:26:27 +0100 Subject: [PATCH 2/2] - fixed: The portal blockmap's AddLineIntercepts methods needs to check the block's range. --- src/portal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/portal.cpp b/src/portal.cpp index de2d1d14b..ad8e166b1 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -155,6 +155,8 @@ static void BuildBlockmap() void FLinePortalTraverse::AddLineIntercepts(int bx, int by) { + if (by < 0 || by >= bmapheight || bx < 0 || bx >= bmapwidth) return; + FPortalBlock &block = PortalBlockmap(bx, by); for (unsigned i = 0; i