From 996ba5e27db302add4d9e1ae32e1151bb291a100 Mon Sep 17 00:00:00 2001 From: Jammyjamjamman Date: Wed, 21 Feb 2018 20:19:22 +0000 Subject: [PATCH] Added more meaningful comment to the command progress resetter. [skip ci] --- source/glest_game/type_instances/unit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 79afbbb32..9de364203 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -2770,8 +2770,10 @@ namespace Glest delete commands.back (); commands.pop_back (); - // Reset the progress if the last task in the queue was cancelled. - /// TODO: extra if statement needed adding to fix this bug. Can this be avoided? + // Reset the progress if the last command in the queue was cancelled. + // We don't want to reset the progress if we're not removing the last command, + // because then the progress of the actual command in progress. + /// TODO: extra if statement below needed adding make the reset function properly. Can this be avoided? if (commands.empty()) resetProgress2(); safeMutex.ReleaseLock ();