forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 248
bugfix: Fix issue where builders could resume completed tasks after being disabled #2793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Stubbjax
wants to merge
16
commits into
TheSuperHackers:main
Choose a base branch
from
Stubbjax:fix-previous-dozer-task
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+291
−68
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
68743ff
bugfix: Fix issue where builders could resume completed tasks after b…
Stubbjax 8b4cd2e
bugfix: Only save the previous task for resumption when explicitly di…
Stubbjax 0c66471
refactor: Move fix to the task resumption method
Stubbjax 6cf851a
docs: Remove superfluous comments
Stubbjax dc11862
refactor: Check construction status bit instead of construction percent
Stubbjax 122edf0
tweak: Still clear previous task if the resumed build fails
Stubbjax 04e0119
refactor: Optimise target acquisition
Stubbjax cbb639a
fix: Reverse condition
Stubbjax 2145c6a
bugfix: Apply correct version condition
Stubbjax cb68740
tweak: Support resumption of repair tasks
Stubbjax 506f141
refactor: Streamline previous task assignment
Stubbjax 5f41b3b
refactor: Push down onDisabledEdge behaviour to DozerAIUpdate and Wor…
Stubbjax 155c6d4
refactor: Remember task as part of cancellation
Stubbjax 3886b38
refactor: Consolidate previous task clearing logic
Stubbjax 6bc5dac
bugfix: Also resume FORTIFY tasks
Stubbjax 3c36a85
bugfix: Cancelling all tasks now clears the previous task
Stubbjax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,9 +139,11 @@ class DozerAIInterface | |
|
|
||
| // task actions | ||
| virtual void newTask( DozerTask task, Object *target ) = 0; ///< set a desire to do the requrested task | ||
| virtual void cancelTask( DozerTask task ) = 0; ///< cancel this task from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void cancelTask( DozerTask task, Bool rememberTask = false ) = 0; ///< cancel this task from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void cancelAllTasks() = 0; ///< cancel all tasks from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void setPreviousTask(DozerTask task) = 0; ///< set the previous task | ||
| virtual void resumePreviousTask() = 0; ///< resume the previous task if there was one | ||
| virtual void clearPreviousTask() = 0; ///< clear the previous task | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it need to be virtual function? If it is only called internally in the implementation, then it can be implementation local. Same for the other Task functions here. |
||
|
|
||
| // internal methods to manage behavior from within the dozer state machine | ||
| virtual void internalTaskComplete( DozerTask task ) = 0; ///< set a dozer task as successfully completed | ||
|
|
@@ -211,6 +213,7 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface | |
| virtual const DozerAIInterface* getDozerAIInterface() const override {return this;} | ||
|
|
||
| virtual void onDelete() override; | ||
| virtual void onDisabledEdge(Bool nowDisabled) override; | ||
|
|
||
| // | ||
| // module data methods ... this is LAME, multiple inheritance off an interface with replicated | ||
|
|
@@ -240,9 +243,11 @@ class DozerAIUpdate : public AIUpdateInterface, public DozerAIInterface | |
|
|
||
| // task actions | ||
| virtual void newTask( DozerTask task, Object *target ) override; ///< set a desire to do the requrested task | ||
| virtual void cancelTask( DozerTask task ) override; ///< cancel this task from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void cancelTask( DozerTask task, Bool rememberTask = false ) override; ///< cancel this task from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void cancelAllTasks() override; ///< cancel all tasks from the queue, if it's the current task the dozer will stop working on it | ||
| virtual void setPreviousTask(DozerTask task) override; ///< set the previous task | ||
| virtual void resumePreviousTask() override; ///< resume the previous task if there was one | ||
| virtual void clearPreviousTask() override; ///< clear the previous task | ||
|
|
||
| // internal methods to manage behavior from within the dozer state machine | ||
| virtual void internalTaskComplete( DozerTask task ) override; ///< set a dozer task as successfully completed | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The EA comment can be expanded that if rememberTask is set that it will resume the task when enabled again.