mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 23:47:21 +00:00
move vars to be local
This commit is contained in:
parent
c237c16c33
commit
485a88dfd4
@ -220,8 +220,15 @@ void Entity::AddPathComponent(TemplateComponents& components) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Entity::Initialize() {
|
void Entity::Initialize() {
|
||||||
// TODO DoPreLoadObject
|
bool hasPhysicsComponent = false;
|
||||||
// TODO set m_HasModelBehaviors accordingly and used appropiately: see Ghidra;
|
bool hasDestroyableComponent = false;
|
||||||
|
bool hasPathFindingComponent = false;
|
||||||
|
bool hasProximityMonitorComponent = false;
|
||||||
|
bool hasScriptComponent = false;
|
||||||
|
bool hasDroppedLootComponent = false;
|
||||||
|
bool hasModelBehaviors = false;
|
||||||
|
uint32_t physicsComponentID = -1;
|
||||||
|
uint32_t modelType = -1;
|
||||||
|
|
||||||
// A few edge cases to tackle first
|
// A few edge cases to tackle first
|
||||||
const auto triggerInfo = GetVarAsString(u"trigger_id");
|
const auto triggerInfo = GetVarAsString(u"trigger_id");
|
||||||
@ -243,304 +250,300 @@ void Entity::Initialize() {
|
|||||||
|
|
||||||
for (const auto& [componentTemplate, componentId] : components) {
|
for (const auto& [componentTemplate, componentId] : components) {
|
||||||
switch (componentTemplate) {
|
switch (componentTemplate) {
|
||||||
case eReplicaComponentType::CONTROLLABLE_PHYSICS:
|
case eReplicaComponentType::CONTROLLABLE_PHYSICS:
|
||||||
AddComponent<ControllablePhysicsComponent>();
|
AddComponent<ControllablePhysicsComponent>();
|
||||||
m_HasPhysicsComponent = true;
|
hasPhysicsComponent = true;
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::RENDER:
|
case eReplicaComponentType::RENDER:
|
||||||
AddComponent<RenderComponent>();
|
AddComponent<RenderComponent>();
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::SIMPLE_PHYSICS:
|
case eReplicaComponentType::SIMPLE_PHYSICS:
|
||||||
AddComponent<SimplePhysicsComponent>(componentId);
|
AddComponent<SimplePhysicsComponent>(componentId);
|
||||||
m_HasPhysicsComponent = true;
|
hasPhysicsComponent = true;
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::CHARACTER:
|
case eReplicaComponentType::CHARACTER:
|
||||||
AddComponent<CharacterComponent>(m_Character);
|
AddComponent<CharacterComponent>(m_Character);
|
||||||
AddComponent<MissionComponent>();
|
AddComponent<MissionComponent>();
|
||||||
AddComponent<PossessorComponent>();
|
AddComponent<PossessorComponent>();
|
||||||
AddComponent<LevelProgressionComponent>();
|
AddComponent<LevelProgressionComponent>();
|
||||||
AddComponent<PlayerForcedMovementComponent>();
|
AddComponent<PlayerForcedMovementComponent>();
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::SCRIPT: {
|
case eReplicaComponentType::SCRIPT: {
|
||||||
std::string script;
|
std::string script;
|
||||||
if (m_TemplateID == LOT_ZONE_CONTROL) {
|
if (m_TemplateID == LOT_ZONE_CONTROL) {
|
||||||
script = ScriptComponent::GetZoneScriptName(componentId);
|
script = ScriptComponent::GetZoneScriptName(componentId);
|
||||||
} else {
|
|
||||||
script = ScriptComponent::GetScriptName(this, componentId);
|
|
||||||
}
|
|
||||||
AddComponent<ScriptComponent>(script); // Technically this should check for if the script name is empty and not create a component if it is.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eReplicaComponentType::BOUNCER:
|
|
||||||
AddComponent<BouncerComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::DESTROYABLE:
|
|
||||||
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) AddComponent<DestroyableComponent>(componentId);
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::SKILL:
|
|
||||||
AddComponent<SkillComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::ITEM:
|
|
||||||
AddComponent<ItemComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::VENDOR:
|
|
||||||
AddComponent<VendorComponent>();
|
|
||||||
if (!HasComponent(eReplicaComponentType::PROXIMITY_MONITOR)) {
|
|
||||||
AddComponent<ProximityMonitorComponent>();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::INVENTORY:
|
|
||||||
AddComponent<InventoryComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::SHOOTING_GALLERY:
|
|
||||||
AddComponent<ShootingGalleryComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS:
|
|
||||||
AddComponent<RigidbodyPhantomPhysicsComponent>();
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::COLLECTIBLE:
|
|
||||||
AddComponent<CollectibleComponent>();
|
|
||||||
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) AddComponent<DestroyableComponent>(componentId);
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::MOVING_PLATFORM:
|
|
||||||
AddComponent<MovingPlatformComponent>(GetVarAsString(u"attached_path"));
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::PET:
|
|
||||||
AddComponent<PetComponent>(componentId);
|
|
||||||
AddComponent<MovementAIComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::HAVOK_VEHICLE_PHYSICS: {
|
|
||||||
// if ldf of use_simple_physics == true
|
|
||||||
// AddComponent<SimplePhysicsComponent>(componentId);
|
|
||||||
// else
|
|
||||||
auto* havokVehiclePhysicsComponent = AddComponent<HavokVehiclePhysicsComponent>();
|
|
||||||
if (havokVehiclePhysicsComponent) {
|
|
||||||
havokVehiclePhysicsComponent->SetPosition(m_DefaultPosition);
|
|
||||||
havokVehiclePhysicsComponent->SetRotation(m_DefaultRotation);
|
|
||||||
}
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eReplicaComponentType::MOVEMENT_AI:
|
|
||||||
AddComponent<MovementAIComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::PROPERTY:
|
|
||||||
AddComponent<PropertyComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::SCRIPTED_ACTIVITY:
|
|
||||||
AddComponent<ScriptedActivityComponent>(componentId);
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::PHANTOM_PHYSICS: {
|
|
||||||
auto* phantomPhysicsComponent = AddComponent<PhantomPhysicsComponent>();
|
|
||||||
if (phantomPhysicsComponent) phantomPhysicsComponent->SetPhysicsEffectActive(false);
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eReplicaComponentType::MODEL_BEHAVIOR: {
|
|
||||||
uint32_t modelType = -1;
|
|
||||||
// Get Model Type form ldf/DB
|
|
||||||
if (!m_HasModelBehaviors && !m_HasPhysicsComponent){
|
|
||||||
AddComponent<SimplePhysicsComponent>(m_PhysicsComponentID);
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
} else if (!m_HasPhysicsComponent) {
|
|
||||||
if (modelType == 0){
|
|
||||||
if(m_PhysicsComponentID == -1) m_PhysicsComponentID = 4246U;
|
|
||||||
AddComponent<ControllablePhysicsComponent>(m_PhysicsComponentID);
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
} else {
|
} else {
|
||||||
if(m_PhysicsComponentID == -1) m_PhysicsComponentID = 4247U;
|
script = ScriptComponent::GetScriptName(this, componentId);
|
||||||
AddComponent<SimplePhysicsComponent>(m_PhysicsComponentID);
|
|
||||||
m_HasPhysicsComponent = true;
|
|
||||||
}
|
}
|
||||||
|
AddComponent<ScriptComponent>(script); // Technically this should check for if the script name is empty and not create a component if it is.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// if has LDF of propertyObjectID || inInventory is true
|
case eReplicaComponentType::BOUNCER:
|
||||||
// AddComponent<MutableModelBehaviorComponent>();
|
AddComponent<BouncerComponent>();
|
||||||
// else
|
break;
|
||||||
AddComponent<ModelBehaviorComponent>();
|
case eReplicaComponentType::DESTROYABLE:
|
||||||
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) {
|
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) AddComponent<DestroyableComponent>(componentId);
|
||||||
auto* destroyableComponent = AddComponent<DestroyableComponent>(componentId);
|
break;
|
||||||
if (destroyableComponent) {
|
case eReplicaComponentType::SKILL:
|
||||||
destroyableComponent->SetHealth(1);
|
AddComponent<SkillComponent>();
|
||||||
destroyableComponent->SetMaxHealth(1.0f);
|
break;
|
||||||
destroyableComponent->SetFaction(-1, true);
|
case eReplicaComponentType::ITEM:
|
||||||
destroyableComponent->SetIsSmashable(true);
|
AddComponent<ItemComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::VENDOR:
|
||||||
|
AddComponent<VendorComponent>();
|
||||||
|
if (!hasProximityMonitorComponent) AddComponent<ProximityMonitorComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::INVENTORY:
|
||||||
|
AddComponent<InventoryComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::SHOOTING_GALLERY:
|
||||||
|
AddComponent<ShootingGalleryComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS:
|
||||||
|
AddComponent<RigidbodyPhantomPhysicsComponent>();
|
||||||
|
hasPhysicsComponent = true;
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::COLLECTIBLE:
|
||||||
|
AddComponent<CollectibleComponent>();
|
||||||
|
if (!hasDestroyableComponent) AddComponent<DestroyableComponent>(componentId);
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::MOVING_PLATFORM:
|
||||||
|
AddComponent<MovingPlatformComponent>(GetVarAsString(u"attached_path"));
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::PET:
|
||||||
|
AddComponent<PetComponent>(componentId);
|
||||||
|
AddComponent<MovementAIComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::HAVOK_VEHICLE_PHYSICS: {
|
||||||
|
if (GetVar<bool>(u"use_simple_physics")) {
|
||||||
|
AddComponent<SimplePhysicsComponent>(componentId);
|
||||||
|
} else {
|
||||||
|
auto* havokVehiclePhysicsComponent = AddComponent<HavokVehiclePhysicsComponent>(componentId);
|
||||||
|
if (havokVehiclePhysicsComponent) {
|
||||||
|
havokVehiclePhysicsComponent->SetPosition(m_DefaultPosition);
|
||||||
|
havokVehiclePhysicsComponent->SetRotation(m_DefaultRotation);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
hasPhysicsComponent = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
case eReplicaComponentType::MOVEMENT_AI:
|
||||||
}
|
AddComponent<MovementAIComponent>();
|
||||||
case eReplicaComponentType::PROPERTY_ENTRANCE:
|
break;
|
||||||
AddComponent<PropertyEntranceComponent>(componentId);
|
case eReplicaComponentType::PROPERTY:
|
||||||
break;
|
AddComponent<PropertyComponent>();
|
||||||
case eReplicaComponentType::PROPERTY_MANAGEMENT:
|
break;
|
||||||
AddComponent<PropertyManagementComponent>();
|
case eReplicaComponentType::SCRIPTED_ACTIVITY:
|
||||||
break;
|
AddComponent<ScriptedActivityComponent>(componentId);
|
||||||
case eReplicaComponentType::QUICK_BUILD:
|
break;
|
||||||
AddComponent<QuickBuildComponent>(componentId);
|
case eReplicaComponentType::PHANTOM_PHYSICS: {
|
||||||
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) AddComponent<DestroyableComponent>(componentId);
|
auto* phantomPhysicsComponent = AddComponent<PhantomPhysicsComponent>();
|
||||||
break;
|
if (phantomPhysicsComponent) phantomPhysicsComponent->SetPhysicsEffectActive(false);
|
||||||
case eReplicaComponentType::SWITCH:
|
hasPhysicsComponent = true;
|
||||||
AddComponent<SwitchComponent>();
|
break;
|
||||||
break;
|
|
||||||
case eReplicaComponentType::MINIGAME_CONTROL:
|
|
||||||
AddComponent<MinigameControlComponent>();
|
|
||||||
break;
|
|
||||||
case eReplicaComponentType::BASE_COMBAT_AI: {
|
|
||||||
auto* baseCombatAiComponent = AddComponent<BaseCombatAIComponent>(componentId);
|
|
||||||
if (baseCombatAiComponent && baseCombatAiComponent->GetTetherSpeed() > 0.0f) {
|
|
||||||
auto* movementAiComponent = AddComponent<MovementAIComponent>();
|
|
||||||
if (!movementAiComponent) break;
|
|
||||||
MovementAIInfo movementAiInfo{};
|
|
||||||
movementAiInfo.movementType = "";
|
|
||||||
movementAiInfo.wanderChance = 0;
|
|
||||||
movementAiInfo.wanderRadius = 16;
|
|
||||||
movementAiInfo.wanderSpeed = 2.5f;
|
|
||||||
movementAiInfo.wanderDelayMax = 5;
|
|
||||||
movementAiInfo.wanderDelayMin = 2;
|
|
||||||
movementAiComponent->SetMoveInfo(movementAiInfo);
|
|
||||||
}
|
}
|
||||||
break;
|
case eReplicaComponentType::MODEL_BEHAVIOR: {
|
||||||
}
|
// Get Model Type form ldf/DB
|
||||||
case eReplicaComponentType::MODULE_ASSEMBLY:
|
if (!hasModelBehaviors && !hasPhysicsComponent){
|
||||||
AddComponent<ModuleAssemblyComponent>();
|
AddComponent<SimplePhysicsComponent>(physicsComponentID);
|
||||||
break;
|
hasPhysicsComponent = true;
|
||||||
case eReplicaComponentType::PROPERTY_VENDOR:
|
} else if (!hasPhysicsComponent) {
|
||||||
AddComponent<PropertyVendorComponent>();
|
if (modelType == 0){
|
||||||
break;
|
if(physicsComponentID == -1) physicsComponentID = 4246U;
|
||||||
case eReplicaComponentType::ROCKET_LAUNCHPAD_CONTROL:
|
AddComponent<ControllablePhysicsComponent>(physicsComponentID);
|
||||||
AddComponent<RocketLaunchpadControlComponent>(componentId);
|
hasPhysicsComponent = true;
|
||||||
break;
|
} else {
|
||||||
case eReplicaComponentType::RACING_CONTROL:
|
if(physicsComponentID == -1) physicsComponentID = 4247U;
|
||||||
AddComponent<RacingControlComponent>();
|
AddComponent<SimplePhysicsComponent>(physicsComponentID);
|
||||||
break;
|
hasPhysicsComponent = true;
|
||||||
case eReplicaComponentType::MISSION_OFFER:
|
}
|
||||||
AddComponent<MissionOfferComponent>(GetLOT());
|
}
|
||||||
break;
|
// if has LDF of propertyObjectID || inInventory is true
|
||||||
case eReplicaComponentType::RACING_STATS:
|
// AddComponent<MutableModelBehaviorComponent>();
|
||||||
AddComponent<RacingStatsComponent>();
|
// else
|
||||||
break;
|
AddComponent<ModelBehaviorComponent>();
|
||||||
case eReplicaComponentType::LUP_EXHIBIT:
|
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) {
|
||||||
AddComponent<LUPExhibitComponent>();
|
auto* destroyableComponent = AddComponent<DestroyableComponent>(componentId);
|
||||||
break;
|
if (destroyableComponent) {
|
||||||
case eReplicaComponentType::SOUND_TRIGGER:
|
destroyableComponent->SetHealth(1);
|
||||||
AddComponent<SoundTriggerComponent>();
|
destroyableComponent->SetMaxHealth(1.0f);
|
||||||
break;
|
destroyableComponent->SetFaction(-1, true);
|
||||||
case eReplicaComponentType::PROXIMITY_MONITOR:
|
destroyableComponent->SetIsSmashable(true);
|
||||||
AddComponent<ProximityMonitorComponent>();
|
}
|
||||||
break;
|
}
|
||||||
case eReplicaComponentType::MULTI_ZONE_ENTRANCE:
|
break;
|
||||||
AddComponent<MultiZoneEntranceComponent>();
|
}
|
||||||
break;
|
case eReplicaComponentType::PROPERTY_ENTRANCE:
|
||||||
case eReplicaComponentType::BUFF:
|
AddComponent<PropertyEntranceComponent>(componentId);
|
||||||
AddComponent<BuffComponent>();
|
break;
|
||||||
break;
|
case eReplicaComponentType::PROPERTY_MANAGEMENT:
|
||||||
case eReplicaComponentType::RAIL_ACTIVATOR:
|
AddComponent<PropertyManagementComponent>();
|
||||||
AddComponent<RailActivatorComponent>(componentId);
|
break;
|
||||||
break;
|
case eReplicaComponentType::QUICK_BUILD:
|
||||||
case eReplicaComponentType::POSSESSABLE:
|
AddComponent<QuickBuildComponent>(componentId);
|
||||||
AddComponent<PossessableComponent>(componentId);
|
if (!HasComponent(eReplicaComponentType::DESTROYABLE)) AddComponent<DestroyableComponent>(componentId);
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::BUILD_BORDER:
|
case eReplicaComponentType::SWITCH:
|
||||||
AddComponent<BuildBorderComponent>();
|
AddComponent<SwitchComponent>();
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::DONATION_VENDOR:
|
case eReplicaComponentType::MINIGAME_CONTROL:
|
||||||
AddComponent<DonationVendorComponent>();
|
AddComponent<MinigameControlComponent>();
|
||||||
if (!HasComponent(eReplicaComponentType::PROXIMITY_MONITOR)) {
|
break;
|
||||||
|
case eReplicaComponentType::BASE_COMBAT_AI: {
|
||||||
|
auto* baseCombatAiComponent = AddComponent<BaseCombatAIComponent>(componentId);
|
||||||
|
if (baseCombatAiComponent && baseCombatAiComponent->GetTetherSpeed() > 0.0f) {
|
||||||
|
auto* movementAiComponent = AddComponent<MovementAIComponent>();
|
||||||
|
if (!movementAiComponent) break;
|
||||||
|
MovementAIInfo movementAiInfo{};
|
||||||
|
movementAiInfo.movementType = "";
|
||||||
|
movementAiInfo.wanderChance = 0;
|
||||||
|
movementAiInfo.wanderRadius = 16;
|
||||||
|
movementAiInfo.wanderSpeed = 2.5f;
|
||||||
|
movementAiInfo.wanderDelayMax = 5;
|
||||||
|
movementAiInfo.wanderDelayMin = 2;
|
||||||
|
movementAiComponent->SetMoveInfo(movementAiInfo);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case eReplicaComponentType::MODULE_ASSEMBLY:
|
||||||
|
AddComponent<ModuleAssemblyComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::PROPERTY_VENDOR:
|
||||||
|
AddComponent<PropertyVendorComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::ROCKET_LAUNCHPAD_CONTROL:
|
||||||
|
AddComponent<RocketLaunchpadControlComponent>(componentId);
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::RACING_CONTROL:
|
||||||
|
AddComponent<RacingControlComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::MISSION_OFFER:
|
||||||
|
AddComponent<MissionOfferComponent>(GetLOT());
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::RACING_STATS:
|
||||||
|
AddComponent<RacingStatsComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::LUP_EXHIBIT:
|
||||||
|
AddComponent<LUPExhibitComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::SOUND_TRIGGER:
|
||||||
|
AddComponent<SoundTriggerComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::PROXIMITY_MONITOR:
|
||||||
AddComponent<ProximityMonitorComponent>();
|
AddComponent<ProximityMonitorComponent>();
|
||||||
}
|
break;
|
||||||
break;
|
case eReplicaComponentType::MULTI_ZONE_ENTRANCE:
|
||||||
case eReplicaComponentType::GATE_RUSH_CONTROL:
|
AddComponent<MultiZoneEntranceComponent>();
|
||||||
AddComponent<GateRushControlComponent>();
|
break;
|
||||||
break;
|
case eReplicaComponentType::BUFF:
|
||||||
case eReplicaComponentType::RACING_SOUND_TRIGGER:
|
AddComponent<BuffComponent>();
|
||||||
AddComponent<RacingSoundTriggerComponent>();
|
break;
|
||||||
break;
|
case eReplicaComponentType::RAIL_ACTIVATOR:
|
||||||
case eReplicaComponentType::ACHIEVEMENT_VENDOR:
|
AddComponent<RailActivatorComponent>(componentId);
|
||||||
AddComponent<AchievementVendorComponent>();
|
break;
|
||||||
break;
|
case eReplicaComponentType::POSSESSABLE:
|
||||||
case eReplicaComponentType::PROJECTILE_PHYSICS:
|
AddComponent<PossessableComponent>(componentId);
|
||||||
// AddComponent<ProjectilePhysicsComponent>();
|
break;
|
||||||
m_HasPhysicsComponent = true;
|
case eReplicaComponentType::BUILD_BORDER:
|
||||||
break;
|
AddComponent<BuildBorderComponent>();
|
||||||
case eReplicaComponentType::VEHICLE_PHYSICS:
|
break;
|
||||||
// AddComponent<VehiclePhysicsComponent>();
|
case eReplicaComponentType::DONATION_VENDOR:
|
||||||
m_HasPhysicsComponent = true;
|
AddComponent<DonationVendorComponent>();
|
||||||
break;
|
if (!hasProximityMonitorComponent) AddComponent<ProximityMonitorComponent>();
|
||||||
case eReplicaComponentType::PHYSICS_SYSTEM:
|
break;
|
||||||
// AddComponent<PhysicsSystemComponent>();
|
case eReplicaComponentType::GATE_RUSH_CONTROL:
|
||||||
m_HasPhysicsComponent = true;
|
AddComponent<GateRushControlComponent>();
|
||||||
break;
|
break;
|
||||||
case eReplicaComponentType::GHOST:
|
case eReplicaComponentType::RACING_SOUND_TRIGGER:
|
||||||
case eReplicaComponentType::SPAWN:
|
AddComponent<RacingSoundTriggerComponent>();
|
||||||
case eReplicaComponentType::MODULAR_BUILD:
|
break;
|
||||||
case eReplicaComponentType::BUILD_CONTROLLER:
|
case eReplicaComponentType::ACHIEVEMENT_VENDOR:
|
||||||
case eReplicaComponentType::BUILD_ACTIVATOR:
|
AddComponent<AchievementVendorComponent>();
|
||||||
case eReplicaComponentType::ICON_ONLY:
|
break;
|
||||||
case eReplicaComponentType::DROP_EFFECT:
|
case eReplicaComponentType::PROJECTILE_PHYSICS:
|
||||||
case eReplicaComponentType::CHEST:
|
// AddComponent<ProjectilePhysicsComponent>();
|
||||||
case eReplicaComponentType::BLUEPRINT:
|
hasPhysicsComponent = true;
|
||||||
case eReplicaComponentType::PLATFORM_BOUNDARY:
|
break;
|
||||||
case eReplicaComponentType::MODULE:
|
case eReplicaComponentType::VEHICLE_PHYSICS:
|
||||||
case eReplicaComponentType::JETPACKPAD:
|
// AddComponent<VehiclePhysicsComponent>();
|
||||||
case eReplicaComponentType::EXHIBIT:
|
hasPhysicsComponent = true;
|
||||||
case eReplicaComponentType::OVERHEAD_ICON:
|
break;
|
||||||
case eReplicaComponentType::PET_CONTROL:
|
case eReplicaComponentType::PHYSICS_SYSTEM:
|
||||||
case eReplicaComponentType::MINIFIG:
|
// AddComponent<PhysicsSystemComponent>();
|
||||||
case eReplicaComponentType::PET_CREATOR:
|
hasPhysicsComponent = true;
|
||||||
case eReplicaComponentType::MODEL_BUILDER:
|
break;
|
||||||
case eReplicaComponentType::SPRINGPAD:
|
case eReplicaComponentType::GHOST:
|
||||||
case eReplicaComponentType::FX:
|
case eReplicaComponentType::SPAWN:
|
||||||
case eReplicaComponentType::CHANGLING_BUILD:
|
case eReplicaComponentType::MODULAR_BUILD:
|
||||||
case eReplicaComponentType::CHOICE_BUILD:
|
case eReplicaComponentType::BUILD_CONTROLLER:
|
||||||
case eReplicaComponentType::PACKAGE:
|
case eReplicaComponentType::BUILD_ACTIVATOR:
|
||||||
case eReplicaComponentType::SOUND_REPEATER:
|
case eReplicaComponentType::ICON_ONLY:
|
||||||
case eReplicaComponentType::SOUND_AMBIENT_2D:
|
case eReplicaComponentType::DROP_EFFECT:
|
||||||
case eReplicaComponentType::SOUND_AMBIENT_3D:
|
case eReplicaComponentType::CHEST:
|
||||||
case eReplicaComponentType::PRECONDITION:
|
case eReplicaComponentType::BLUEPRINT:
|
||||||
case eReplicaComponentType::FLAG:
|
case eReplicaComponentType::PLATFORM_BOUNDARY:
|
||||||
case eReplicaComponentType::CUSTOM_BUILD_ASSEMBLY:
|
case eReplicaComponentType::MODULE:
|
||||||
case eReplicaComponentType::SHOWCASE_MODEL_HANDLER:
|
case eReplicaComponentType::JETPACKPAD:
|
||||||
case eReplicaComponentType::RACING_MODULE:
|
case eReplicaComponentType::EXHIBIT:
|
||||||
case eReplicaComponentType::GENERIC_ACTIVATOR:
|
case eReplicaComponentType::OVERHEAD_ICON:
|
||||||
case eReplicaComponentType::HF_LIGHT_DIRECTION_GADGET:
|
case eReplicaComponentType::PET_CONTROL:
|
||||||
case eReplicaComponentType::ROCKET_ANIMATION_CONTROL:
|
case eReplicaComponentType::MINIFIG:
|
||||||
case eReplicaComponentType::TRIGGER:
|
case eReplicaComponentType::PET_CREATOR:
|
||||||
case eReplicaComponentType::DROPPED_LOOT:
|
case eReplicaComponentType::MODEL_BUILDER:
|
||||||
case eReplicaComponentType::FACTION_TRIGGER:
|
case eReplicaComponentType::SPRINGPAD:
|
||||||
case eReplicaComponentType::BBB:
|
case eReplicaComponentType::FX:
|
||||||
case eReplicaComponentType::CHAT_BUBBLE:
|
case eReplicaComponentType::CHANGLING_BUILD:
|
||||||
case eReplicaComponentType::FRIENDS_LIST:
|
case eReplicaComponentType::CHOICE_BUILD:
|
||||||
case eReplicaComponentType::GUILD:
|
case eReplicaComponentType::PACKAGE:
|
||||||
case eReplicaComponentType::LOCAL_SYSTEM:
|
case eReplicaComponentType::SOUND_REPEATER:
|
||||||
case eReplicaComponentType::MISSION:
|
case eReplicaComponentType::SOUND_AMBIENT_2D:
|
||||||
case eReplicaComponentType::MUTABLE_MODEL_BEHAVIORS:
|
case eReplicaComponentType::SOUND_AMBIENT_3D:
|
||||||
case eReplicaComponentType::PATHFINDING:
|
case eReplicaComponentType::PRECONDITION:
|
||||||
case eReplicaComponentType::PET_TAMING_CONTROL:
|
case eReplicaComponentType::FLAG:
|
||||||
case eReplicaComponentType::PROPERTY_EDITOR:
|
case eReplicaComponentType::CUSTOM_BUILD_ASSEMBLY:
|
||||||
case eReplicaComponentType::SKINNED_RENDER:
|
case eReplicaComponentType::SHOWCASE_MODEL_HANDLER:
|
||||||
case eReplicaComponentType::SLASH_COMMAND:
|
case eReplicaComponentType::RACING_MODULE:
|
||||||
case eReplicaComponentType::STATUS_EFFECT:
|
case eReplicaComponentType::GENERIC_ACTIVATOR:
|
||||||
case eReplicaComponentType::TEAMS:
|
case eReplicaComponentType::HF_LIGHT_DIRECTION_GADGET:
|
||||||
case eReplicaComponentType::TEXT_EFFECT:
|
case eReplicaComponentType::ROCKET_ANIMATION_CONTROL:
|
||||||
case eReplicaComponentType::TRADE:
|
case eReplicaComponentType::TRIGGER:
|
||||||
case eReplicaComponentType::USER_CONTROL:
|
case eReplicaComponentType::DROPPED_LOOT:
|
||||||
case eReplicaComponentType::IGNORE_LIST:
|
case eReplicaComponentType::FACTION_TRIGGER:
|
||||||
case eReplicaComponentType::INTERACTION_MANAGER:
|
case eReplicaComponentType::BBB:
|
||||||
case eReplicaComponentType::COMBAT_MEDIATOR:
|
case eReplicaComponentType::CHAT_BUBBLE:
|
||||||
case eReplicaComponentType::ROLLER:
|
case eReplicaComponentType::FRIENDS_LIST:
|
||||||
case eReplicaComponentType::PLAYER_FORCED_MOVEMENT:
|
case eReplicaComponentType::GUILD:
|
||||||
case eReplicaComponentType::CRAFTING:
|
case eReplicaComponentType::LOCAL_SYSTEM:
|
||||||
case eReplicaComponentType::LEVEL_PROGRESSION:
|
case eReplicaComponentType::MISSION:
|
||||||
case eReplicaComponentType::POSSESSOR:
|
case eReplicaComponentType::MUTABLE_MODEL_BEHAVIORS:
|
||||||
case eReplicaComponentType::MOUNT_CONTROL:
|
case eReplicaComponentType::PATHFINDING:
|
||||||
case eReplicaComponentType::UNKNOWN_112:
|
case eReplicaComponentType::PET_TAMING_CONTROL:
|
||||||
case eReplicaComponentType::PROPERTY_PLAQUE:
|
case eReplicaComponentType::PROPERTY_EDITOR:
|
||||||
case eReplicaComponentType::UNKNOWN_115:
|
case eReplicaComponentType::SKINNED_RENDER:
|
||||||
case eReplicaComponentType::CULLING_PLANE:
|
case eReplicaComponentType::SLASH_COMMAND:
|
||||||
case eReplicaComponentType::NUMBER_OF_COMPONENTS:
|
case eReplicaComponentType::STATUS_EFFECT:
|
||||||
case eReplicaComponentType::INVALID:
|
case eReplicaComponentType::TEAMS:
|
||||||
default:
|
case eReplicaComponentType::TEXT_EFFECT:
|
||||||
Game::logger->Log("Entity", "Attempted to create component %i for lot %i but no creator exists. Component will not be created.", componentId, m_TemplateID);
|
case eReplicaComponentType::TRADE:
|
||||||
|
case eReplicaComponentType::USER_CONTROL:
|
||||||
|
case eReplicaComponentType::IGNORE_LIST:
|
||||||
|
case eReplicaComponentType::INTERACTION_MANAGER:
|
||||||
|
case eReplicaComponentType::COMBAT_MEDIATOR:
|
||||||
|
case eReplicaComponentType::ROLLER:
|
||||||
|
case eReplicaComponentType::PLAYER_FORCED_MOVEMENT:
|
||||||
|
case eReplicaComponentType::CRAFTING:
|
||||||
|
case eReplicaComponentType::LEVEL_PROGRESSION:
|
||||||
|
case eReplicaComponentType::POSSESSOR:
|
||||||
|
case eReplicaComponentType::MOUNT_CONTROL:
|
||||||
|
case eReplicaComponentType::UNKNOWN_112:
|
||||||
|
case eReplicaComponentType::PROPERTY_PLAQUE:
|
||||||
|
case eReplicaComponentType::UNKNOWN_115:
|
||||||
|
case eReplicaComponentType::CULLING_PLANE:
|
||||||
|
case eReplicaComponentType::NUMBER_OF_COMPONENTS:
|
||||||
|
case eReplicaComponentType::INVALID:
|
||||||
|
default:
|
||||||
|
Game::logger->Log("Entity", "Attempted to create component %i for lot %i but no creator exists. Component will not be created.", componentId, m_TemplateID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,10 +379,6 @@ protected:
|
|||||||
std::vector<LWOOBJID> m_TargetsInPhantom;
|
std::vector<LWOOBJID> m_TargetsInPhantom;
|
||||||
|
|
||||||
static const std::vector<ComponentWhitelist> m_ComponentWhitelists;
|
static const std::vector<ComponentWhitelist> m_ComponentWhitelists;
|
||||||
|
|
||||||
bool m_HasModelBehaviors = false;
|
|
||||||
bool m_HasPhysicsComponent = false;
|
|
||||||
uint32_t m_PhysicsComponentID = -1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "Entity.tcc"
|
#include "Entity.tcc"
|
||||||
|
Loading…
Reference in New Issue
Block a user