mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Implement Rocket Launch Lup Component
This commit is contained in:
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user