diff --git a/dChatServer/JSONUtils.cpp b/dChatServer/JSONUtils.cpp index b3dfc4e7..1c32409c 100644 --- a/dChatServer/JSONUtils.cpp +++ b/dChatServer/JSONUtils.cpp @@ -17,7 +17,11 @@ void to_json(json& data, const PlayerData& playerData) { } void to_json(json& data, const PlayerContainer& playerContainer) { - data = playerContainer.GetAllPlayers(); + data = json::array(); + for(auto& playerData : playerContainer.GetAllPlayers()) { + if (playerData.first == LWOOBJID_EMPTY) continue; + data.push_back(playerData.second); + } } void to_json(json& data, const TeamContainer& teamContainer) {