From 591acdded4527d6657af8d5ee2f3b1b77beac02d Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Mon, 20 Dec 2010 03:12:00 +0000 Subject: [PATCH] No red 3d arrow pointer is painted when commanding via minimap --- source/glest_game/gui/gui.cpp | 13 ++++++++----- source/glest_game/gui/gui.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index c12235c9..f6736ec8 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -404,14 +404,14 @@ void Gui::giveDefaultOrders(int x, int y){ console->addStdMessage("InvalidPosition"); return; } - giveDefaultOrders(targetPos.x,targetPos.y,targetUnit); + giveDefaultOrders(targetPos.x,targetPos.y,targetUnit,true); } void Gui::givePreparedDefaultOrders(int x, int y){ - giveDefaultOrders(x, y, NULL); + giveDefaultOrders(x, y, NULL,false); } -void Gui::giveDefaultOrders(int x, int y,const Unit *targetUnit){ +void Gui::giveDefaultOrders(int x, int y,const Unit *targetUnit, bool paintMouse3d){ bool queueKeyDown = isKeyDown(queueCommandKey); Vec2i targetPos=Vec2i(x, y); //give order @@ -420,7 +420,8 @@ void Gui::giveDefaultOrders(int x, int y,const Unit *targetUnit){ //graphical result addOrdersResultToConsole(activeCommandClass, result); if(result == crSuccess || result == crSomeFailed){ - mouse3d.enable(); + if(paintMouse3d) + mouse3d.enable(); if(random.randRange(0, 1)==0){ SoundRenderer::getInstance().playFx( @@ -474,7 +475,9 @@ void Gui::giveTwoClickOrders(int x, int y , bool prepared){ //graphical result addOrdersResultToConsole(activeCommandClass, result); if(result == crSuccess || result == crSomeFailed){ - mouse3d.enable(); + if(!prepared){ + mouse3d.enable(); + } if(random.randRange(0, 1)==0){ SoundRenderer::getInstance().playFx( diff --git a/source/glest_game/gui/gui.h b/source/glest_game/gui/gui.h index 91eb9ba2..62644346 100644 --- a/source/glest_game/gui/gui.h +++ b/source/glest_game/gui/gui.h @@ -183,7 +183,7 @@ private: //orders void giveDefaultOrders(int x, int y); - void giveDefaultOrders(int x, int y, const Unit *targetUnit); + void giveDefaultOrders(int x, int y, const Unit *targetUnit, bool paintMouse3d); void givePreparedDefaultOrders(int x, int y); void giveOneClickOrders(); void giveTwoClickOrders(int x, int y, bool prepared);