From 39938efd6c437391ddfaadfb9c4dbe4f08c54556 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Fri, 20 May 2016 11:59:43 +0200 Subject: added feature tutorIP. --- src/server/util/global.cpp | 5 +---- src/server/util/global.h | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/server/util') diff --git a/src/server/util/global.cpp b/src/server/util/global.cpp index 41f6389..39e72fb 100644 --- a/src/server/util/global.cpp +++ b/src/server/util/global.cpp @@ -38,15 +38,12 @@ void Global::setCurrentRoom(QString room) const Room* Global::getCurrentRoom() { if (_rooms.contains(_currentRoom)) { - qDebug() << "returning actual room: " << _currentRoom; return _rooms[_currentRoom]; } else { - qDebug() << "couldn't find the room name " << _currentRoom << " in the _rooms-Map"; static Room* defaultRoom = NULL; if (defaultRoom == NULL) { - defaultRoom = new Room(QMap(), QSize(8, 6), QSize(1,1), ""); + defaultRoom = new Room(QMap(), QSize(8, 6), QSize(1,1), "", ""); } - qDebug() << "returned default room"; return defaultRoom; } } diff --git a/src/server/util/global.h b/src/server/util/global.h index 59bed27..4a71348 100644 --- a/src/server/util/global.h +++ b/src/server/util/global.h @@ -17,15 +17,17 @@ #include struct Room { - Room(QMap cPos, QSize grid, QSize client, QString image) : + Room(QMap cPos, QSize grid, QSize client, QString image, QString tutor) : clientPositions(cPos), gridSize(grid), clientSize(client), - imagePath(image) {}; + imagePath(image), + tutorIP(tutor){}; QMap clientPositions; QSize gridSize; QSize clientSize; QString imagePath; + QString tutorIP; }; class Global { -- cgit v1.2.3-55-g7522