cleanup logs, fix overrides, define LOTs in header

This commit is contained in:
Aaron Kimbre
2022-04-18 21:02:04 -05:00
parent 8fe5c00984
commit f3dd71ccb1
8 changed files with 18 additions and 22 deletions

View File

@@ -2,20 +2,18 @@
#include "EntityManager.h"
#include "GeneralUtils.h"
void HydrantSmashable::OnDie(Entity* self, Entity* killer)
void HydrantSmashable::OnDie(Entity* self, Entity* killer)
{
const auto hydrantName = self->GetVar<std::u16string>(u"hydrant");
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);