mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
cleanup logs, fix overrides, define LOTs in header
This commit is contained in:
parent
8fe5c00984
commit
f3dd71ccb1
@ -10,8 +10,6 @@ void HydrantBroken::OnStartup(Entity* self)
|
||||
|
||||
const auto bouncers = EntityManager::Instance()->GetEntitiesInGroup(hydrant);
|
||||
|
||||
Game::logger->Log("HydrantBroken", "Broken Hydrant spawned (%s)\n", hydrant.c_str());
|
||||
|
||||
for (auto* bouncer : bouncers)
|
||||
{
|
||||
self->SetVar<LWOOBJID>(u"bouncer", bouncer->GetObjectID());
|
||||
|
@ -9,14 +9,12 @@ void HydrantSmashable::OnDie(Entity* self, Entity* killer)
|
||||
LDFBaseData* data = new LDFData<std::string>(u"hydrant", GeneralUtils::UTF16ToWTF8(hydrantName));
|
||||
|
||||
EntityInfo info {};
|
||||
info.lot = 7328;
|
||||
info.lot = HYDRANT_BROKEN;
|
||||
info.pos = self->GetPosition();
|
||||
info.rot = self->GetRotation();
|
||||
info.settings = {data};
|
||||
info.spawnerID = self->GetSpawnerID();
|
||||
|
||||
Game::logger->Log("HydrantBroken", "Hydrant spawned (%s)\n", data->GetString().c_str());
|
||||
|
||||
auto* hydrant = EntityManager::Instance()->CreateEntity(info);
|
||||
|
||||
EntityManager::Instance()->ConstructEntity(hydrant);
|
||||
|
@ -5,4 +5,6 @@ class HydrantSmashable : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnDie(Entity* self, Entity* killer) override;
|
||||
private:
|
||||
LOT HYDRANT_BROKEN = 7328;
|
||||
};
|
@ -10,8 +10,6 @@ void RockHydrantBroken::OnStartup(Entity* self)
|
||||
|
||||
const auto bouncers = EntityManager::Instance()->GetEntitiesInGroup(hydrant);
|
||||
|
||||
Game::logger->Log("RockHydrantBroken", "Broken Rock Hydrant spawned (%s)\n", hydrant.c_str());
|
||||
|
||||
for (auto* bouncer : bouncers)
|
||||
{
|
||||
self->SetVar<LWOOBJID>(u"bouncer", bouncer->GetObjectID());
|
||||
|
@ -9,14 +9,12 @@ void RockHydrantSmashable::OnDie(Entity* self, Entity* killer)
|
||||
LDFBaseData* data = new LDFData<std::string>(u"hydrant", GeneralUtils::UTF16ToWTF8(hydrantName));
|
||||
|
||||
EntityInfo info {};
|
||||
info.lot = 12293;
|
||||
info.lot = ROCK_HYDRANT_BROKEN;
|
||||
info.pos = self->GetPosition();
|
||||
info.rot = self->GetRotation();
|
||||
info.settings = {data};
|
||||
info.spawnerID = self->GetSpawnerID();
|
||||
|
||||
Game::logger->Log("RockHydrantBroken", "Rock Hydrant spawned (%s)\n", data->GetString().c_str());
|
||||
|
||||
auto* hydrant = EntityManager::Instance()->CreateEntity(info);
|
||||
|
||||
EntityManager::Instance()->ConstructEntity(hydrant);
|
||||
|
@ -5,5 +5,7 @@ class RockHydrantSmashable : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnDie(Entity* self, Entity* killer);
|
||||
private:
|
||||
LOT ROCK_HYDRANT_BROKEN = 12293;
|
||||
};
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
class WhFans : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnStartup(Entity* self);
|
||||
void OnDie(Entity* self, Entity* killer);
|
||||
void OnStartup(Entity* self) override;
|
||||
void OnDie(Entity* self, Entity* killer) override;
|
||||
void OnFireEventServerSide(
|
||||
Entity *self,
|
||||
Entity *sender,
|
||||
@ -16,7 +16,7 @@ public:
|
||||
int32_t param1,
|
||||
int32_t param2,
|
||||
int32_t param3
|
||||
);
|
||||
) override;
|
||||
private:
|
||||
void ToggleFX(Entity* self, bool hit);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user