Skip to content

Commit

Permalink
forgot to remove the checks on discover(Actors/Pickups)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiaansu committed Feb 7, 2025
1 parent 3fe12e4 commit 88e1243
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,7 @@ void Streamer::discoverActors(Player &player, const std::vector<SharedCell> &cel
{
for (std::unordered_map<int, Item::SharedActor>::const_iterator a = (*c)->actors.begin(); a != (*c)->actors.end(); ++a)
{
std::unordered_set<int> worlds = a->second->worlds;
if (worlds.empty())
{
worlds.insert(-1);
}

for (std::unordered_set<int>::const_iterator w = worlds.begin(); w != worlds.end(); ++w)
for (std::unordered_set<int>::const_iterator w = a->second->worlds.begin(); w != a->second->worlds.end(); ++w)
{
if (player.worldId != *w && *w != -1)
{
Expand All @@ -634,7 +628,7 @@ void Streamer::discoverActors(Player &player, const std::vector<SharedCell> &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]))
{
Expand Down Expand Up @@ -1071,13 +1065,7 @@ void Streamer::discoverPickups(Player &player, const std::vector<SharedCell> &ce
{
for (std::unordered_map<int, Item::SharedPickup>::const_iterator p = (*c)->pickups.begin(); p != (*c)->pickups.end(); ++p)
{
std::unordered_set<int> worlds = p->second->worlds;
if (worlds.empty())
{
worlds.insert(-1);
}

for (std::unordered_set<int>::const_iterator w = worlds.begin(); w != worlds.end(); ++w)
for (std::unordered_set<int>::const_iterator w = p->second->worlds.begin(); w != p->second->worlds.end(); ++w)
{
if (player.worldId != *w && *w != -1)
{
Expand All @@ -1088,7 +1076,7 @@ void Streamer::discoverPickups(Player &player, const std::vector<SharedCell> &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]))
{
Expand Down

0 comments on commit 88e1243

Please sign in to comment.