mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 00:07:13 +00:00
refactor(entity): components are made in the client's load order
Entity::Initialize walks ComponentOrderVector::Initialize's list (0x0101f8e0) as ObjectLoader2::DoObjectComponentLoad does; ids a component needs from a later one come from the registry; the trigger is added after the walk. All 15,962 LOTs get the same components as before (LoaderSnapshotTest). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,13 @@ namespace {
|
||||
constexpr float DEFAULT_BODY_RADIUS = 1.7f;
|
||||
}
|
||||
|
||||
float BaseCombatAIComponent::TetherSpeedOf(const int32_t componentID) {
|
||||
auto query = CDClientDatabase::CreatePreppedStmt("SELECT tetherSpeed FROM BaseCombatAIComponent WHERE id = ?;");
|
||||
query.bind(1, static_cast<int>(componentID));
|
||||
auto result = query.execQuery();
|
||||
return !result.eof() && !result.fieldIsNull("tetherSpeed") ? result.getFloatField("tetherSpeed") : 4.0f;
|
||||
}
|
||||
|
||||
BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
|
||||
RegisterMsg(&BaseCombatAIComponent::MsgGetObjectReportInfo);
|
||||
m_Target = LWOOBJID_EMPTY;
|
||||
|
||||
Reference in New Issue
Block a user