From 699e203270ea5abe4b4ece77025a9cc956ff77e7 Mon Sep 17 00:00:00 2001 From: Petr Ohlidal Date: Sat, 2 Sep 2023 11:43:35 +0200 Subject: [PATCH] Fixes #3079 - Minimap teleport doesn't work if in vehicle Broken in https://github.com/RigsOfRods/rigs-of-rods/commit/3111ec97917d6c7eea461d6873687701f6cdb8b2 - adding linked actors to the worklist accidentally overwrites the player actor. --- source/main/GameContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main/GameContext.cpp b/source/main/GameContext.cpp index 35fe9c9fd2..703c367150 100644 --- a/source/main/GameContext.cpp +++ b/source/main/GameContext.cpp @@ -845,8 +845,8 @@ void GameContext::TeleportPlayer(float x, float z) Ogre::Vector3 translation = Ogre::Vector3(x, y, z) - this->GetPlayerActor()->ar_nodes[0].AbsPosition; std::vector actorsToBeamUp; - actorsToBeamUp.push_back(this->GetPlayerActor()); actorsToBeamUp.assign(this->GetPlayerActor()->ar_linked_actors.begin(), this->GetPlayerActor()->ar_linked_actors.end()); + actorsToBeamUp.push_back(this->GetPlayerActor()); float src_agl = std::numeric_limits::max(); float dst_agl = std::numeric_limits::max();