diff --git a/src/p_spec.cpp b/src/p_spec.cpp index ba2f7a766..bd7eabdeb 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -1207,7 +1207,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 771558455..5407ed9b6 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -532,7 +532,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 (); diff --git a/src/portal.cpp b/src/portal.cpp index af0f96b33..91a24e2e3 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -156,6 +156,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