mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
fix: remove hardcoded rotations now that vehicles orient correctly (#1132)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user