mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
fix: remove hardcoded rotations now that vehicles orient correctly (#1132)
This commit is contained in:
parent
5cc7479f29
commit
9375c36c7b
@ -995,17 +995,7 @@ void InventoryComponent::HandlePossession(Item* item) {
|
||||
|
||||
// Check to see if the mount is a vehicle, if so, flip it
|
||||
auto* vehicleComponent = mount->GetComponent<VehiclePhysicsComponent>();
|
||||
if (vehicleComponent) {
|
||||
auto angles = startRotation.GetEulerAngles();
|
||||
// Make it right side up
|
||||
angles.x -= PI;
|
||||
// Make it going in the direction of the player
|
||||
angles.y -= PI;
|
||||
startRotation = NiQuaternion::FromEulerAngles(angles);
|
||||
mount->SetRotation(startRotation);
|
||||
// We're pod racing now
|
||||
characterComponent->SetIsRacing(true);
|
||||
}
|
||||
if (vehicleComponent) characterComponent->SetIsRacing(true);
|
||||
|
||||
// Setup the destroyable stats
|
||||
auto* destroyableComponent = mount->GetComponent<DestroyableComponent>();
|
||||
|
@ -1267,18 +1267,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
return;
|
||||
}
|
||||
|
||||
auto vehiclePhysicsComponent = newEntity->GetComponent<VehiclePhysicsComponent>();
|
||||
if (vehiclePhysicsComponent) {
|
||||
auto newRot = newEntity->GetRotation();
|
||||
auto angles = newRot.GetEulerAngles();
|
||||
// make it right side up
|
||||
angles.x -= PI;
|
||||
// make it going in the direction of the player
|
||||
angles.y -= PI;
|
||||
newRot = NiQuaternion::FromEulerAngles(angles);
|
||||
newEntity->SetRotation(newRot);
|
||||
}
|
||||
|
||||
EntityManager::Instance()->ConstructEntity(newEntity);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user