diff --git a/src/p_map.cpp b/src/p_map.cpp index bce8c77395..eb537a3b18 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -857,6 +857,8 @@ bool PIT_CheckLine(line_t *ld, const FBoundingBox &box, FCheckPosition &tm) fixedvec2 ref = FindRefPoint(ld, rpos); FLineOpening open; + P_LineOpening(open, tm.thing, ld, ref.x, ref.y, tm.x, tm.y, 0); + // the floorplane on both sides is identical with the current one // so don't mess around with the z-position. if (ld->frontsector->floorplane == ld->backsector->floorplane && diff --git a/src/portal.cpp b/src/portal.cpp index efd46d8518..62c44ce2f0 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -918,6 +918,8 @@ void P_CreateLinkedPortals() } if (orgs.Size() == 0) { + // Create the 0->0 translation which is always needed. + Displacements.Create(1); return; } for (int i = 0; i < numsectors; i++) diff --git a/src/portal.h b/src/portal.h index c974d8049f..33fb866921 100644 --- a/src/portal.h +++ b/src/portal.h @@ -41,6 +41,11 @@ struct FDisplacementTable TArray data; int size; + FDisplacementTable() + { + Create(1); + } + void Create(int numgroups) { data.Resize(numgroups*numgroups); @@ -50,6 +55,7 @@ struct FDisplacementTable FDisplacement &operator()(int x, int y) { + if (x == y) return data[0]; // shortcut for the most common case return data[x + size*y]; } };