fix: frient player correctly when using pirate mast in FV

This commit is contained in:
Aaron Kimbre 2023-05-11 22:08:07 -05:00
parent 0e01948414
commit ea745951a6

View File

@ -43,10 +43,12 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) {
GameMessages::SendTeleport(playerId, position, rotation, player->GetSystemAddress(), true); GameMessages::SendTeleport(playerId, position, rotation, player->GetSystemAddress(), true);
// Hacky fix for odd rotations // Hacky fix for odd rotations
if (self->GetVar<std::u16string>(u"MastName") != u"Jail") { if (self->GetVar<std::u16string>(u"MastName") == u"Elephant") {
GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 140.0f, player->GetSystemAddress()); GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 140.0f, player->GetSystemAddress());
} else { } else if (self->GetVar<std::u16string>(u"MastName") == u"Jail") {
GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 100.0f, player->GetSystemAddress()); GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 100.0f, player->GetSystemAddress());
} else if (self->GetVar<std::u16string>(u"MastName") == u""){
GameMessages::SendOrientToAngle(playerId, true, (M_PI / 180) * 203.0f, player->GetSystemAddress());
} }
const auto cinematic = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Cinematic")); const auto cinematic = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Cinematic"));