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
534 B
C++
Raw Permalink Normal View History

#include "AgMonumentLaserServer.h"
#include "EntityManager.h"
void AgMonumentLaserServer::OnStartup(Entity* self) {
auto lasers = Game::entityManager->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 = Game::entityManager->GetEntitiesInGroup(self->GetVarAsString(u"volGroup"));
for (auto laser : lasers) {
if (laser) laser->SetBoolean(u"active", false);
}
}