- add selection type to debug view ingame

This commit is contained in:
Mark Vejvoda 2013-01-24 00:14:29 +00:00
parent d7d83f7c5e
commit cc89b6ba65
2 changed files with 14 additions and 1 deletions

View File

@ -4213,6 +4213,19 @@ string Game::getDebugStats(std::map<int,string> &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";

View File

@ -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);
}