mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 06:57:28 +00:00
fix: adding a proximity monitor when one exists already (#1235)
This commit is contained in:
parent
9aa81f95cc
commit
aab60567ba
@ -827,7 +827,8 @@ void Entity::Unsubscribe(LWOOBJID scriptObjId, const std::string& notificationNa
|
||||
}
|
||||
|
||||
void Entity::SetProximityRadius(float proxRadius, std::string name) {
|
||||
ProximityMonitorComponent* proxMon = AddComponent<ProximityMonitorComponent>();
|
||||
auto* proxMon = GetComponent<ProximityMonitorComponent>();
|
||||
if (!proxMon) proxMon = AddComponent<ProximityMonitorComponent>();
|
||||
proxMon->SetProximityRadius(proxRadius, name);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user