Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
rt committed Oct 3, 2012
1 parent b198646 commit 8650222
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rts/Sim/MoveTypes/GroundMoveType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8650222

Please sign in to comment.