Add loading from database

yahoo
This commit is contained in:
David Markowitz
2024-05-18 03:36:29 -07:00
parent fd1c6ab2ea
commit 0c4108e730
19 changed files with 149 additions and 19 deletions

View File

@@ -225,7 +225,7 @@ void Entity::Initialize() {
AddComponent<SimplePhysicsComponent>(simplePhysicsComponentID);
AddComponent<ModelComponent>();
AddComponent<ModelComponent>()->LoadBehaviors();
AddComponent<RenderComponent>();
@@ -649,7 +649,7 @@ void Entity::Initialize() {
}
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::MODEL, -1) != -1 && !GetComponent<PetComponent>()) {
AddComponent<ModelComponent>();
AddComponent<ModelComponent>()->LoadBehaviors();
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) {
auto* destroyableComponent = AddComponent<DestroyableComponent>();
destroyableComponent->SetHealth(1);