Skip to content

Commit d5ac512

Browse files
author
pavanvo
committed
feat: disable stop command if queue-key presed
1 parent 84e0e0a commit d5ac512

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/glest_game/gui/gui.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ void Gui::giveOneClickOrders(){
475475

476476
std::pair<CommandResult,string> result(crFailUndefined,"");
477477
bool queueKeyDown = isKeyDown(queueCommandKey);
478+
if(activeCommandType && activeCommandType->isQueuable()==qNever && queueKeyDown) return;
479+
478480
if(selection.isUniform()){
479481
result= commander->tryGiveCommand(&selection, activeCommandType, Vec2i(0), (Unit*)NULL, queueKeyDown);
480482
}
@@ -553,7 +555,8 @@ void Gui::giveTwoClickOrders(int x, int y , bool prepared) {
553555
}
554556

555557
bool queueKeyDown = isKeyDown(queueCommandKey);
556-
//give orders to the units of this faction
558+
if(activeCommandType && activeCommandType->isQueuable()==qNever && queueKeyDown) return;
559+
//give orders to the units of this faction
557560
if(selectingBuilding == false) {
558561
if(selection.isUniform()) {
559562
result= commander->tryGiveCommand(&selection, activeCommandType,

0 commit comments

Comments
 (0)