From a847d469846c4a1f3b3785cdf660b93607c85c0f Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 2 Jun 2017 18:33:51 +0800 Subject: [PATCH] [Client] Get rid Z axis in direction.pos --- apps/openmw/mwmechanics/character.cpp | 1 - apps/openmw/mwmp/DedicatedPlayer.cpp | 1 - apps/openmw/mwmp/LocalPlayer.cpp | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index fae6facb2..c7991f35b 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1693,7 +1693,6 @@ void CharacterController::update(float duration) MWMechanics::Movement &movementSettings = cls.getMovementSettings(mPtr); localPlayer->direction.pos[0] = movementSettings.mPosition[0]; localPlayer->direction.pos[1] = movementSettings.mPosition[1]; - localPlayer->direction.pos[2] = movementSettings.mPosition[2]; } else if (mwmp::Main::get().getCellController()->isLocalActor(mPtr)) { diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index 57258762c..ff210b27f 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -124,7 +124,6 @@ void DedicatedPlayer::move(float dt) MWMechanics::Movement *move = &ptr.getClass().getMovementSettings(ptr); move->mPosition[0] = direction.pos[0]; move->mPosition[1] = direction.pos[1]; - move->mPosition[2] = direction.pos[2]; MWMechanics::zTurn(ptr, position.rot[2], osg::DegreesToRadians(1.0)); } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 3f0df37d8..fe19f9b49 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -325,7 +325,7 @@ void LocalPlayer::updatePosition(bool forceUpdate) position = player.getRefData().getPosition(); - bool posIsChanging = (direction.pos[0] != 0 || direction.pos[1] != 0 || direction.pos[2] != 0 || + bool posIsChanging = (direction.pos[0] != 0 || direction.pos[1] != 0 || position.rot[0] != oldRot[0] || position.rot[2] != oldRot[1]); if (forceUpdate || posIsChanging || posWasChanged)