public byte DefaultCollisionValue(int x, int y, float BumpConstraint, float[,] GroundPlane, byte b, float[,] Heights, CollisionIndex[,] cI)
        {
            if (x < 1 || y < 1 || x >= MaxXPt || y >= MaxYPt)
            {
                return(SimPathStore.BLOCKED);
            }
            if (b == SimPathStore.STICKY_PASSABLE)
            {
                return(b);
            }
            float ZLevel = Heights[x, y];
            float GLevel = GroundPlane[x, y];

            if (ZLevel < GLevel)
            {
                ZLevel = GLevel;
            }
            var             cci             = cI[x, y];
            CollisionObject collisionObject = null;

            if (cci != null)
            {
                collisionObject = cci.GetObjectAt(ZLevel);
            }
            int bumps;

            if (x == 270 && y == 1275)
            {
                collisionObject = collisionObject;
            }

            // fixed "contiguous objects need to be passable"
            if (collisionObject != null)
            {
                bumps = NeighborBump(x, y, ZLevel, MaxZ, ZLevel, 0.1f, Heights, cI, collisionObject, false, true);
                if (bumps >= 4)
                {
                    return(SimPathStore.BRIDGY);
                }
            }

            // this tests for hieght differnces
            bumps = NeighborBump(x, y, ZLevel, MaxZ, ZLevel, BumpConstraint, Heights, cI,
                                 collisionObject, false, false);
            if (bumps > 0)
            {
                return(SimPathStore.BLOCKED);
            }
            if (bumps > 0)
            {
                //  return SimPathStore.BLOCKED;
            }

            if (BumpConstraintPurple > CollisionIndex.MaxBumpInOpenPath)
            {
                // this looks for transitions between objects
                bumps = NeighborBump(x, y, ZLevel, MaxZ, ZLevel, BumpConstraintPurple, Heights, cI,
                                     collisionObject, true, false);
                if (bumps > 0)
                {
                    return(SimPathStore.BLOCK_PURPLE);
                }
            }

            if (collisionObject == null)
            {
                float Water = PathStore.WaterHeight;
                if (DiffLessThan(Water, ZLevel, 0.1f))
                {
                    return(SimPathStore.WATER_Z);
                }
                if (DiffLessThan(Water, PathStore.GroundPlane[x, y], 0.1f))
                {
                    return(SimPathStore.WATER_G);
                }

                float MaxZLevel = MaxZ;
                if (MaxZLevel <= ZLevel - 2)
                {
                    return(SimPathStore.TOO_HIGH);
                }
                if (ZLevel + 20 < MaxZLevel) // needs passable
                {
                    return(SimPathStore.TOO_LOW);
                }
            }

            // this looks for transitions between objects
            bumps = NeighborBump(x, y, ZLevel, MaxZ, ZLevel, 0.1f, Heights, cI, collisionObject, true, false);
            if (bumps > 0)
            {
                if (collisionObject != null)
                {
                    return(SimPathStore.MAYBE_BLOCKED);
                }
                return(SimPathStore.MAYBE_BLOCKED);
            }

            // this looks for little bumps
            bumps = NeighborBump(x, y, ZLevel, MaxZ, ZLevel, 0.1f, Heights, cI, null, false, false);
            if (bumps > 0)
            {
                return(SimPathStore.BLOCK_PURPLE);
            }


            if (b > 200)
            {
                return(--b);
            }

            CollisionIndex c = cI[x, y];

            if (c != null)
            {
                return(c.GetOccupiedValue(GLevel, ZLevel));
            }

            if (b > 10)
            {
                return(--b);
            }
            return(SimPathStore.INITIALLY);
        }