From 1ca8094628d5ddee4ebb40fffbc9124a45ad2019 Mon Sep 17 00:00:00 2001 From: Gent S Date: Thu, 3 Dec 2020 15:33:14 -0500 Subject: [PATCH] Fix regression with disconnected player on Skyway agent. --- src/TransportManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TransportManager.cpp b/src/TransportManager.cpp index 0bbe287..35b544c 100644 --- a/src/TransportManager.cpp +++ b/src/TransportManager.cpp @@ -218,14 +218,14 @@ void TransportManager::stepSkywaySystem() { std::queue* queue = &it->second; - Player* plr = PlayerManager::getPlayer(it->first); - - if (plr == nullptr) { + if (PlayerManager::players.find(it->first) == PlayerManager::players.end()) { // pluck out dead socket + update iterator it = SkywayQueues.erase(it); continue; } + Player* plr = PlayerManager::getPlayer(it->first); + if (queue->empty()) { // send dismount packet INITSTRUCT(sP_FE2CL_REP_PC_RIDING_SUCC, rideSucc);