DarkflameServer/dScripts/PropertyDeathPlane.cpp

17 lines
487 B
C++
Raw Permalink Normal View History

#include "PropertyDeathPlane.h"
#include "Entity.h"
#include "GameMessages.h"
#include "EntityManager.h"
2022-07-28 13:39:57 +00:00
void PropertyDeathPlane::OnCollisionPhantom(Entity* self, Entity* target) {
const auto teleportGroup = EntityManager::Instance()->GetEntitiesInGroup("Teleport");
2022-07-28 13:39:57 +00:00
if (teleportGroup.size() == 0) {
return;
}
2022-07-28 13:39:57 +00:00
auto* teleport = teleportGroup[0];
2022-07-28 13:39:57 +00:00
GameMessages::SendTeleport(target->GetObjectID(), teleport->GetPosition(), teleport->GetRotation(), target->GetSystemAddress());
}