From cc89b6ba6596f9500bf7d07ca35719d4904fef0b Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 24 Jan 2013 00:14:29 +0000 Subject: [PATCH] - add selection type to debug view ingame --- source/glest_game/game/game.cpp | 13 +++++++++++++ source/glest_game/gui/gui.cpp | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 81048b88e..899f211f1 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -4213,6 +4213,19 @@ string Game::getDebugStats(std::map &factionDebugInfo) { str+= "ExploredCellsLookupItemCache: " + world.getExploredCellsLookupItemCacheStats()+"\n"; str+= "FowAlphaCellsLookupItemCache: " + world.getFowAlphaCellsLookupItemCacheStats()+"\n"; + const bool selectBufPickingSelection = Config::getInstance().getBool("EnableSelectBufPicking","false"); + const bool colorPickingSelection = Config::getInstance().getBool("EnableColorPicking","true"); + const bool frustumPickingSelection = Config::getInstance().getBool("EnableFrustumPicking","false"); + if(selectBufPickingSelection) { + str += "Unit selection type: selectBuf\n"; + } + else if(frustumPickingSelection) { + str += "Unit selection type: frustrum\n"; + } + else { + str += "Unit selection type: color picking\n"; + } + //str+= "AllFactionsCacheStats: " + world.getAllFactionsCacheStats()+"\n"; //str+= "AttackWarningCount: " + intToStr(world.getUnitUpdater()->getAttackWarningCount()) + "\n"; diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index fb7b69bf2..107a105d6 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -286,7 +286,7 @@ void Gui::mouseDownRightGraphics(int x, int y , bool prepared) { } else { Vec2i targetPos; - if(Renderer::getInstance().computePosition(Vec2i(x, y), targetPos, true) && + if(Renderer::getInstance().computePosition(Vec2i(x, y), targetPos) && world->getMap()->isInsideSurface(world->getMap()->toSurfCoords(targetPos)) == true) { giveDefaultOrders(x, y); }