Public release of the DLU server code!

Have fun!
This commit is contained in:
Unknown
2021-12-05 18:54:36 +01:00
parent 5f7270e4ad
commit 0545adfac3
1146 changed files with 368646 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
#include "EntityCallbackTimer.h"
EntityCallbackTimer::EntityCallbackTimer(float time, std::function<void()> callback) {
m_Time = time;
m_Callback = callback;
}
EntityCallbackTimer::~EntityCallbackTimer() {
}
std::function<void()> EntityCallbackTimer::GetCallback() {
return m_Callback;
}
float EntityCallbackTimer::GetTime() {
return m_Time;
}
void EntityCallbackTimer::Update(float deltaTime) {
m_Time -= deltaTime;
}

View File

@@ -0,0 +1,19 @@
#pragma once
#include <string>
#include <functional>
class EntityCallbackTimer {
public:
EntityCallbackTimer(float time, std::function<void()> callback);
~EntityCallbackTimer();
std::function<void()> GetCallback();
float GetTime();
void Update(float deltaTime);
private:
std::function<void()> m_Callback;
float m_Time;
};

View File

@@ -0,0 +1,40 @@
#pragma once
#include <vector>
#include "dCommonVars.h"
#include "NiPoint3.h"
#include "NiQuaternion.h"
#include "LDFFormat.h"
class Spawner;
struct EntityInfo {
EntityInfo() {
spawner = nullptr;
spawnerID = 0;
hasSpawnerNodeID = false;
spawnerNodeID = 0;
id = 0;
lot = LOT_NULL;
pos = {0,0,0};
rot = {0,0,0,0};
settings = {};
networkSettings = {};
scale = 1.0f;
}
Spawner* spawner;
LWOOBJID spawnerID;
bool hasSpawnerNodeID;
uint32_t spawnerNodeID;
LWOOBJID id;
LOT lot;
NiPoint3 pos;
NiQuaternion rot;
std::vector<LDFBaseData*> settings;
std::vector<LDFBaseData*> networkSettings;
float scale;
};

View File

@@ -0,0 +1,22 @@
#include "EntityTimer.h"
EntityTimer::EntityTimer(std::string name, float time) {
m_Name = name;
m_Time = time;
}
EntityTimer::~EntityTimer() {
}
std::string EntityTimer::GetName() {
return m_Name;
}
float EntityTimer::GetTime() {
return m_Time;
}
void EntityTimer::Update(float deltaTime) {
m_Time -= deltaTime;
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include <string>
class EntityTimer {
public:
EntityTimer(std::string name, float time);
~EntityTimer();
std::string GetName();
float GetTime();
void Update(float deltaTime);
private:
std::string m_Name;
float m_Time;
};