Skip to content

Commit

Permalink
fix: orient player correctly when using pirate mast in FV (#1087)
Browse files Browse the repository at this point in the history
* fix: frient player correctly when using pirate mast in FV

* only get mast name once
  • Loading branch information
aronwk-aaron authored May 13, 2023
1 parent 739eae5 commit 1af7016
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dScripts/02_server/Map/GF/MastTeleport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::u16string>(u"MastName") != u"Jail") {
auto mastName = self->GetVar<std::u16string>(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<std::u16string>(u"Cinematic"));
Expand Down

0 comments on commit 1af7016

Please sign in to comment.