Merge branch 'main' into components-wheeeee

This commit is contained in:
Aaron Kimbrell
2023-07-05 07:59:52 -05:00
committed by GitHub
4 changed files with 5 additions and 18 deletions

View File

@@ -1266,19 +1266,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
ChatPackets::SendSystemMessage(sysAddr, u"Failed to spawn entity.");
return;
}
auto* havokVehiclePhysicsComponent = newEntity->GetComponent<HavokVehiclePhysicsComponent>();
if (havokVehiclePhysicsComponent) {
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);
}