mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
chore: Remove dpEntity pointers from collision checking (#1529)
* chore: Remove dpEntity pointers from collision checking * Update fn documentation in ProximityMonitorComponent.h * use more idiomatic method to calculate vector index * feedback * missed a ranges::find replacement * adjust for feedback. last changes tonight. * okay, also remove unneeded include. then sleep. * for real tho * update to use unordered_set instead of set
This commit is contained in:
@@ -21,7 +21,7 @@ void WanderingVendor::OnProximityUpdate(Entity* self, Entity* entering, std::str
|
||||
|
||||
const auto proxObjs = proximityMonitorComponent->GetProximityObjects("playermonitor");
|
||||
bool foundPlayer = false;
|
||||
for (const auto id : proxObjs | std::views::keys) {
|
||||
for (const auto id : proxObjs) {
|
||||
auto* entity = Game::entityManager->GetEntity(id);
|
||||
if (entity && entity->IsPlayer()) {
|
||||
foundPlayer = true;
|
||||
|
Reference in New Issue
Block a user