DarkflameServer/dScripts/02_server/Map/AG/AgMonumentLaserServer.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
546 B
C++
Raw Normal View History

#include "AgMonumentLaserServer.h"
#include "EntityManager.h"
void AgMonumentLaserServer::OnStartup(Entity* self) {
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
for (auto laser : lasers) {
if (laser) laser->SetBoolean(u"active", true);
}
}
void AgMonumentLaserServer::OnDie(Entity* self, Entity* killer) {
auto lasers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
for (auto laser : lasers) {
if (laser) laser->SetBoolean(u"active", false);
}
}