From 275dfaf05fa33674f113f0b016f4e203c7759f21 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 19 Feb 2017 17:27:38 +0200 Subject: [PATCH] [Server] Add Cell::getDescription() for debugging purposes --- apps/openmw-mp/Cell.cpp | 9 +++++---- apps/openmw-mp/Cell.hpp | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index 1726b744a..c2e7d94fe 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -29,9 +29,7 @@ void Cell::removePlayer(Player *player) players.erase(it); return; } - } - } Cell::TPlayers Cell::getPlayers() @@ -39,6 +37,11 @@ Cell::TPlayers Cell::getPlayers() return players; } +std::string Cell::getDescription() const +{ + return cell.getDescription(); +} + CellController::CellController() { @@ -90,7 +93,6 @@ Cell *CellController::getCellByID(std::string cellid) Cell *CellController::addCell(ESM::Cell cellData) { - LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Loaded cells: %d", cells.size()); auto it = find_if(cells.begin(), cells.end(), [cellData](const Cell *c) { //return c->cell.sRecordId == cellData.sRecordId; // Currently we cannot compare because plugin lists can be loaded in different order @@ -128,7 +130,6 @@ void CellController::removeCell(Cell *cell) void CellController::removePlayer(Cell *cell, Player *player) { - cell->removePlayer(player); if (cell->players.empty()) diff --git a/apps/openmw-mp/Cell.hpp b/apps/openmw-mp/Cell.hpp index 27d6ddba1..758a9fa33 100644 --- a/apps/openmw-mp/Cell.hpp +++ b/apps/openmw-mp/Cell.hpp @@ -59,6 +59,8 @@ public: void removePlayer(Player *player); TPlayers getPlayers(); + + std::string getDescription() const; private: TPlayers players; ESM::Cell cell;