Implement Rocket Launch Lup Component

This commit is contained in:
Aaron Kimbre
2022-05-03 15:05:29 -05:00
parent 427c4a8c33
commit bd3e8aee51
8 changed files with 94 additions and 208 deletions

View File

@@ -22,6 +22,7 @@
#include "Component.h"
#include "ControllablePhysicsComponent.h"
#include "RenderComponent.h"
#include "RocketLaunchLupComponent.h"
#include "CharacterComponent.h"
#include "DestroyableComponent.h"
#include "BuffComponent.h"
@@ -456,9 +457,10 @@ void Entity::Initialize()
else comp = new InventoryComponent(this);
m_Components.insert(std::make_pair(COMPONENT_TYPE_INVENTORY, comp));
}
if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_ROCKET_LAUNCH_LUP) > 0) {
m_Components.insert(std::make_pair(COMPONENT_TYPE_ROCKET_LAUNCH_LUP, nullptr));
// if this component exists, then we initialize it. it's value is always 0
if (compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_ROCKET_LAUNCH_LUP, -1) != -1) {
auto comp = new RocketLaunchLupComponent(this);
m_Components.insert(std::make_pair(COMPONENT_TYPE_ROCKET_LAUNCH_LUP, comp));
}
/**
@@ -495,13 +497,6 @@ void Entity::Initialize()
std::string customScriptServer;
bool hasCustomServerScript = false;
// Custom script for the LUP teleporter
if (m_TemplateID == 14333)
{
hasCustomServerScript = true;
customScriptServer = "scripts\\02_server\\DLU\\L_SB_LUP_TELEPORT.lua";
}
const auto customScriptServerName = GetVarAsString(u"custom_script_server");
const auto customScriptClientName = GetVarAsString(u"custom_script_client");