From 88e1243bead6291fb5491736e2a67a52bbeb11a2 Mon Sep 17 00:00:00 2001 From: Tiaansu Date: Fri, 7 Feb 2025 14:07:34 +0800 Subject: [PATCH] forgot to remove the checks on discover(Actors/Pickups) --- src/streamer.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/streamer.cpp b/src/streamer.cpp index e0f32f9..2d6230e 100644 --- a/src/streamer.cpp +++ b/src/streamer.cpp @@ -617,13 +617,7 @@ void Streamer::discoverActors(Player &player, const std::vector &cel { for (std::unordered_map::const_iterator a = (*c)->actors.begin(); a != (*c)->actors.end(); ++a) { - std::unordered_set worlds = a->second->worlds; - if (worlds.empty()) - { - worlds.insert(-1); - } - - for (std::unordered_set::const_iterator w = worlds.begin(); w != worlds.end(); ++w) + for (std::unordered_set::const_iterator w = a->second->worlds.begin(); w != a->second->worlds.end(); ++w) { if (player.worldId != *w && *w != -1) { @@ -634,7 +628,7 @@ void Streamer::discoverActors(Player &player, const std::vector &cel if (d == core->getData()->discoveredActors.end()) { const int playerWorldId = *w == -1 ? -1 : player.worldId; - if (doesPlayerSatisfyConditions(a->second->players, player.playerId, a->second->interiors, player.interiorId, worlds, playerWorldId, a->second->areas, player.internalAreas, a->second->inverseAreaChecking)) + if (doesPlayerSatisfyConditions(a->second->players, player.playerId, a->second->interiors, player.interiorId, a->second->worlds, playerWorldId, a->second->areas, player.internalAreas, a->second->inverseAreaChecking)) { if (a->second->comparableStreamDistance < STREAMER_STATIC_DISTANCE_CUTOFF || boost::geometry::comparable_distance(player.position, Eigen::Vector3f(a->second->position + a->second->positionOffset)) < (a->second->comparableStreamDistance * player.radiusMultipliers[STREAMER_TYPE_ACTOR])) { @@ -1071,13 +1065,7 @@ void Streamer::discoverPickups(Player &player, const std::vector &ce { for (std::unordered_map::const_iterator p = (*c)->pickups.begin(); p != (*c)->pickups.end(); ++p) { - std::unordered_set worlds = p->second->worlds; - if (worlds.empty()) - { - worlds.insert(-1); - } - - for (std::unordered_set::const_iterator w = worlds.begin(); w != worlds.end(); ++w) + for (std::unordered_set::const_iterator w = p->second->worlds.begin(); w != p->second->worlds.end(); ++w) { if (player.worldId != *w && *w != -1) { @@ -1088,7 +1076,7 @@ void Streamer::discoverPickups(Player &player, const std::vector &ce if (d == core->getData()->discoveredPickups.end()) { const int playerWorldId = *w == -1 ? -1 : player.worldId; - if (doesPlayerSatisfyConditions(p->second->players, player.playerId, p->second->interiors, player.interiorId, worlds, playerWorldId, p->second->areas, player.internalAreas, p->second->inverseAreaChecking)) + if (doesPlayerSatisfyConditions(p->second->players, player.playerId, p->second->interiors, player.interiorId, p->second->worlds, playerWorldId, p->second->areas, player.internalAreas, p->second->inverseAreaChecking)) { if (p->second->comparableStreamDistance < STREAMER_STATIC_DISTANCE_CUTOFF || boost::geometry::comparable_distance(player.position, Eigen::Vector3f(p->second->position + p->second->positionOffset)) < (p->second->comparableStreamDistance * player.radiusMultipliers[STREAMER_TYPE_PICKUP])) {