Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tweak

  • Loading branch information...
commit 8650222ec4463ebf86945ad919bfcfa267c230c7 1 parent b198646
rt authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 rts/Sim/MoveTypes/GroundMoveType.cpp
View
6 rts/Sim/MoveTypes/GroundMoveType.cpp
@@ -1274,10 +1274,12 @@ bool CGroundMoveType::CanGetNextWayPoint() {
for (int x = xmin; x < xmax; x++) {
for (int z = zmin; z < zmax; z++) {
- if ((CMoveMath::SquareIsBlocked(owner->moveDef, x, z, owner) & CMoveMath::BLOCK_STRUCTURE) == 0) {
+ const bool noStructBlock = ((CMoveMath::SquareIsBlocked(*owner->moveDef, x, z, owner) & CMoveMath::BLOCK_STRUCTURE) == 0);
+ const bool noGroundBlock = (CMoveMath::GetPosSpeedMod(*owner->moveDef, pos) >= 0.01f);
+
+ if (noStructBlock && noGroundBlock) {
continue;
}
-
if ((pos - cwp).SqLength() > (SQUARE_SIZE * SQUARE_SIZE)) {
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.