Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / gpm_service / variables.cpp
blobe1f02b6edfc44f0093d31be30722ecaedd2dea86
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "stdpch.h"
20 #include "variables.h"
22 #include "nel/misc/variable.h"
23 #include "nel/misc/entity_id.h"
25 #include "world_position_manager.h"
27 using namespace std;
28 using namespace NLMISC;
30 uint32 NumEntities = 0;
31 uint32 NumPlayers = 0;
32 bool Verbose = false;
33 bool CheckPlayerSpeed = true;
37 NLMISC_VARIABLE(uint32, NumEntities, "Number of entities currently on service");
40 NLMISC_VARIABLE(uint32, NumPlayers, "Number of players currently on service");
43 NLMISC_VARIABLE(bool, Verbose, "Allow display of verbose info");
46 NLMISC_VARIABLE(bool, CheckPlayerSpeed, "Allow checking player speed -- debug only!");
50 NLMISC_DYNVARIABLE(string, Watch0, "Display of entity 0")
52 static NLMISC::CEntityId id;
53 if (get)
55 if (id != NLMISC::CEntityId::Unknown)
56 *pointer = CWorldPositionManager::debugString(CWorldPositionManager::getEntityIndex(id));
58 else
60 id.fromString((*pointer).c_str());
65 NLMISC_DYNVARIABLE(string, Watch1, "Display of entity 1")
67 static NLMISC::CEntityId id;
68 if (get)
70 if (id != NLMISC::CEntityId::Unknown)
71 *pointer = CWorldPositionManager::debugString(CWorldPositionManager::getEntityIndex(id));
73 else
75 id.fromString((*pointer).c_str());