mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 00:07:13 +00:00
refactor(component): physics components load in the client's phases
The physics row's collision group in LoadDataFromTemplate and the level's CollisionGroupID in LoadConfigData; each physics type then reads its own level keys and makes its physics after that, in the same order as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,11 @@ SimplePhysicsComponent::SimplePhysicsComponent(Entity* parent, const int32_t com
|
||||
|
||||
m_Position = m_Parent->GetDefaultPosition();
|
||||
m_Rotation = m_Parent->GetDefaultRotation();
|
||||
}
|
||||
|
||||
// After the physics config: climbable type, motion type and the blocker
|
||||
void SimplePhysicsComponent::LoadConfigData() {
|
||||
PhysicsComponent::LoadConfigData();
|
||||
|
||||
const auto& climbable_type = m_Parent->GetVar<std::u16string>(u"climbable");
|
||||
if (climbable_type == u"wall") {
|
||||
|
||||
Reference in New Issue
Block a user