void ModelRenderManager::UpdatePlayer(const Player& player) { ATLASSERT(m_spPlayerModelRenderInstance != NULL); if (m_spPlayerModelRenderInstance == nullptr) return; m_modelManager.Update(player, m_spPlayerModelRenderInstance->DisplayState()); m_spPlayerModelRenderInstance->SetPosition(player.Pos(), player.ViewAngle()); MovementInfo movementInfo = player.GetMovementInfo(); movementInfo.Position(player.Pos()); m_spPlayerModelRenderInstance->UpdateMovementInfo(movementInfo); m_selectedObjectId = player.Selection(); }
void ModelRenderInstance::UpdateMovementInfo(const MovementInfo& movementInfo) { m_spDisplayState->UpdateMovement(movementInfo); SetPosition(movementInfo.Position(), movementInfo.ViewAngle()); }