chore: make scripted activity derived from activity (#1363)

* chore: make scripted activity derived from activity
this paves the way for other component being properly derived from the activity component

* use a dirty flag instead

* address feedback
This commit is contained in:
Aaron Kimbrell
2023-12-28 19:11:19 -06:00
committed by GitHub
parent ef6f2f133e
commit fddf99946f
5 changed files with 429 additions and 455 deletions

View File

@@ -605,8 +605,8 @@ void Entity::Initialize() {
}
// Scripted activity component
int scriptedActivityID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::SCRIPTED_ACTIVITY);
if ((scriptedActivityID > 0)) {
int scriptedActivityID = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::SCRIPTED_ACTIVITY, -1);
if ((scriptedActivityID != -1)) {
AddComponent<ScriptedActivityComponent>(scriptedActivityID);
}