- fixed: The portal blockmap's AddLineIntercepts methods needs to check the block's range.

This commit is contained in:
Christoph Oelckers 2016-03-24 18:26:27 +01:00
parent deafa0bce0
commit 75bcec411e

View file

@ -155,6 +155,8 @@ static void BuildBlockmap()
void FLinePortalTraverse::AddLineIntercepts(int bx, int by) void FLinePortalTraverse::AddLineIntercepts(int bx, int by)
{ {
if (by < 0 || by >= bmapheight || bx < 0 || bx >= bmapwidth) return;
FPortalBlock &block = PortalBlockmap(bx, by); FPortalBlock &block = PortalBlockmap(bx, by);
for (unsigned i = 0; i<block.portallines.Size(); i++) for (unsigned i = 0; i<block.portallines.Size(); i++)