Skip to content

Commit

Permalink
tweak: uncertain tweak in forceMigration target entity
Browse files Browse the repository at this point in the history
  • Loading branch information
blattersturm committed Jul 11, 2020
1 parent 9411575 commit fcba8e3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ void ServerGameState::UpdateEntities()
// #TODO: maybe non-client too?
if (client)
{
MoveEntityToCandidate(entity, client);
MoveEntityToCandidate(entity, {});
}

// store the current time so we'll only try again in 10 seconds, not *the next frame*
Expand Down Expand Up @@ -1868,7 +1868,7 @@ bool ServerGameState::MoveEntityToCandidate(const std::shared_ptr<sync::SyncEnti
{
auto entityClient = entity->client.lock();

if (!entityClient)
if (!entityClient || !client)
{
hasClient = false;
}
Expand Down Expand Up @@ -1961,7 +1961,7 @@ bool ServerGameState::MoveEntityToCandidate(const std::shared_ptr<sync::SyncEnti
{
auto& candidate = *candidates->begin();

GS_LOG("reassigning entity %d from %s to %s\n", entity->handle, client->GetName(), std::get<1>(candidate)->GetName());
GS_LOG("reassigning entity %d from %s to %s\n", entity->handle, client ? client->GetName() : "", std::get<1>(candidate)->GetName());

ReassignEntity(entity->handle, std::get<1>(candidate));
}
Expand Down

0 comments on commit fcba8e3

Please sign in to comment.