From c3d02492df890bd134afbc26d1eb59c63394d02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Tue, 29 Mar 2022 19:49:02 +0300 Subject: [PATCH] Cleanup stopMovement --- apps/openmw/mwmechanics/aiwander.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index 6cfe1e5fcd..378e5a6351 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -88,8 +88,9 @@ namespace MWMechanics void stopMovement(const MWWorld::Ptr& actor) { - actor.getClass().getMovementSettings(actor).mPosition[0] = 0; - actor.getClass().getMovementSettings(actor).mPosition[1] = 0; + auto& movementSettings = actor.getClass().getMovementSettings(actor); + movementSettings.mPosition[0] = 0; + movementSettings.mPosition[1] = 0; } std::vector getInitialIdle(const std::vector& idle)