mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-16 04:58:32 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
18
dScripts/AgMonumentRaceGoal.cpp
Normal file
18
dScripts/AgMonumentRaceGoal.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "AgMonumentRaceGoal.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
|
||||
void AgMonumentRaceGoal::OnStartup(Entity* self)
|
||||
{
|
||||
self->SetProximityRadius(15, "RaceGoal");
|
||||
}
|
||||
|
||||
void AgMonumentRaceGoal::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status)
|
||||
{
|
||||
if (name == "RaceGoal" && entering->IsPlayer() && status == "ENTER")
|
||||
{
|
||||
auto* manager = EntityManager::Instance()->GetEntitiesInGroup("race_manager")[0];
|
||||
|
||||
manager->OnFireEventServerSide(entering, "course_finish");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user