refactor(entity): components load their config and save after all exist, as the client

LWOGameObject::MakeReadyForSerialization runs each component's
LoadConfigData and then a character's LoadFromSaveData, in the order the
components were made, once DoObjectComponentLoad has made them all; then
their Startup. Entity::Initialize now does the same with a component list in
creation order (the client's componentList); the walk's own save calls
(mission, physics, destroyable, level, character, skill, ghost) and the
destroyable's call into the buff go. A model's behaviors load in its
LoadConfigData; controllable physics places a non-character at
construction, as the client's physics takes the spawn position. A component
added later still loads at once. Same bytes for every LOT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 17:47:30 -05:00
parent 818d584c76
commit b81ffb2d28
5 changed files with 39 additions and 25 deletions

View File

@@ -33,6 +33,7 @@ ModelComponent::ModelComponent(Entity* parent, const int32_t componentID) : Comp
// The level config: the user model this is
void ModelComponent::LoadConfigData() {
m_userModelID = m_Parent->GetVarAs<LWOOBJID>(u"userModelID");
LoadBehaviors();
}
bool ModelComponent::OnResetModelToDefaults(GameMessages::ResetModelToDefaults& reset) {