diff --git a/source/core/gamefuncs.cpp b/source/core/gamefuncs.cpp index 46c0279e5..8eded9fef 100644 --- a/source/core/gamefuncs.cpp +++ b/source/core/gamefuncs.cpp @@ -1263,7 +1263,7 @@ int pushmove(DVector3& pos, sectortype** pSect, double walldist, double ceildist int FindBestSector(const DVector3& pos) { - int bestnum = 1; + int bestnum = -1; double bestdist = FLT_MAX; for (int secnum = (int)sector.Size() - 1; secnum >= 0; secnum--) {