From 1af70161eb70ad5b00dba6f586e4447f3e1ac552 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Sat, 13 May 2023 09:31:13 -0500 Subject: [PATCH] fix: orient player correctly when using pirate mast in FV (#1087) * fix: frient player correctly when using pirate mast in FV * only get mast name once --- dScripts/02_server/Map/GF/MastTeleport.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dScripts/02_server/Map/GF/MastTeleport.cpp b/dScripts/02_server/Map/GF/MastTeleport.cpp index 97b126b4..1447a6a0 100644 --- a/dScripts/02_server/Map/GF/MastTeleport.cpp +++ b/dScripts/02_server/Map/GF/MastTeleport.cpp @@ -43,10 +43,13 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) { GameMessages::SendTeleport(playerId, position, rotation, player->GetSystemAddress(), true); // Hacky fix for odd rotations - if (self->GetVar(u"MastName") != u"Jail") { + auto mastName = self->GetVar(u"MastName"); + if (mastName == u"Elephant") { GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 140.0f, player->GetSystemAddress()); - } else { + } else if (mastName == u"Jail") { GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 100.0f, player->GetSystemAddress()); + } else if (mastName == u""){ + GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 203.0f, player->GetSystemAddress()); } const auto cinematic = GeneralUtils::UTF16ToWTF8(self->GetVar(u"Cinematic"));