1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 23:45:32 +00:00

Remove redundant variable

This commit is contained in:
elsid 2020-05-16 15:52:33 +02:00
parent 8c4acc69c4
commit 71350c6dff
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -276,8 +276,7 @@ namespace MWMechanics
completeManualWalking(actor, storage); completeManualWalking(actor, storage);
} }
AiWanderStorage::WanderState& wanderState = storage.mState; if (storage.mState == AiWanderStorage::Wander_MoveNow && storage.mCanWanderAlongPathGrid)
if ((wanderState == AiWanderStorage::Wander_MoveNow) && storage.mCanWanderAlongPathGrid)
{ {
// Construct a new path if there isn't one // Construct a new path if there isn't one
if(!mPathFinder.isPathConstructed()) if(!mPathFinder.isPathConstructed())
@ -293,7 +292,7 @@ namespace MWMechanics
completeManualWalking(actor, storage); completeManualWalking(actor, storage);
} }
if (wanderState == AiWanderStorage::Wander_Walking if (storage.mState == AiWanderStorage::Wander_Walking
&& (isDestinationHidden(actor, mPathFinder.getPath().back()) && (isDestinationHidden(actor, mPathFinder.getPath().back())
|| isAreaOccupiedByOtherActor(actor, mPathFinder.getPath().back()))) || isAreaOccupiedByOtherActor(actor, mPathFinder.getPath().back())))
completeManualWalking(actor, storage); completeManualWalking(actor, storage);