Skip to content

Commit

Permalink
fix NonMoving segv
Browse files Browse the repository at this point in the history
gbom cell-size bump
  • Loading branch information
rt committed Jan 17, 2019
1 parent b5698c2 commit be16529
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rts/Sim/Misc/GroundBlockingObjectMap.h
Expand Up @@ -107,7 +107,7 @@ template<typename T, size_t S> struct ArrayVector {



typedef ArrayVector<CSolidObject, 8> BlockingMapCell;
typedef ArrayVector<CSolidObject, 16> BlockingMapCell;
typedef std::vector<BlockingMapCell> BlockingMap;

class CGroundBlockingObjectMap
Expand Down
5 changes: 3 additions & 2 deletions rts/Sim/Units/CommandAI/MobileCAI.cpp
Expand Up @@ -1034,8 +1034,9 @@ void CMobileCAI::NonMoving()
buggerPos = buggerOffPos + buggerVec.Normalize() * buggerOffRadius * 1.25f;
}

// check if buggerPos is (still) reachable
if (!owner->moveDef->TestMoveSquare(nullptr, buggerPos, buggerVec))
// check if buggerPos is (still) reachable; aircraft
// (or all units) might want to ask the GBOM instead
if (owner->moveDef != nullptr && !owner->moveDef->TestMoveSquare(nullptr, buggerPos, buggerVec))
buggerPos = -OnesVector;
}

Expand Down

0 comments on commit be16529

Please sign in to comment.