feat(entity): the object's interaction distance, preconditions and world state, as the client

LWOGameObject loads these itself: interactionDistance from its Objects row
(16 without one) and the level's interaction_distance over it,
CheckPrecondition and objectWorldState from the level config, before its
components load theirs. The quickbuild, the pet and the race instancer read
them from the object; the race instancer now uses the Objects row's
distance like the client does, instead of a fixed 16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-02 08:44:53 -05:00
parent 0c215de446
commit 6f4fd4054a
10 changed files with 47 additions and 7 deletions

View File

@@ -59,7 +59,7 @@ void QuickBuildComponent::LoadDataFromTemplate() {
}
void QuickBuildComponent::LoadConfigData() {
std::u16string checkPreconditions = m_Parent->GetVar<std::u16string>(u"CheckPrecondition");
const auto& checkPreconditions = m_Parent->GetCheckPrecondition();
if (!checkPreconditions.empty()) {
m_Precondition = new PreconditionExpression(GeneralUtils::UTF16ToWTF8(checkPreconditions));