mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-24 06:23:35 +00:00
8d37d9b681
* Organize dScripts whitespace Remove parent scope Remove parent scope from initial setter Remove debug Remove helper programs * Fix NtImagimeterVisibility script Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
16 lines
496 B
C++
16 lines
496 B
C++
#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");
|
|
}
|
|
}
|