bugfix(ai): Prevent units from deploying when moving - #3016
Conversation
e3a6993 to
7a918c9
Compare
|
I tried using Even if fixed, an |
|
| Filename | Overview |
|---|---|
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DeployStyleAIUpdate.cpp | Adds a non-retail movement guard to range-triggered deployment without changing guard-idle or retail-compatible behavior. |
Reviews (1): Last reviewed commit: "bugfix(ai): Prevent units from deploying..." | Re-trigger Greptile
| #if RETAIL_COMPATIBLE_CRC | ||
| if( isInRange || isInGuardIdleState ) | ||
| #else | ||
| if( (isInRange && !ai->isMoving()) || isInGuardIdleState ) |
There was a problem hiding this comment.
I wonder if the isTryingToMove and ai->isMoving() should be consolidated. Do both of them try to conclude the same condition?
|
I tested this branch and it does not fix the Nuke Cannon deployment bug. Tested on map https://github.com/TheSuperHackers/GeneralsGamePatch/tree/main/Maps/Any/!TestAllFactionsBuildingsUnitsPromo |
It does appear to fix TheSuperHackers/GeneralsGamePatch#269 though. |
|
Accidental fix ) |
Can you share a VS22 replay of this? |
|
Repro: Put Guard Mode behind a blob of units on this test map. |
|
I suspect you're seeing other yet unfixed issues with the Nuke Cannon. With the fix in place, I cannot reproduce the issue shown in the video here #176 (comment). Would like to see a VS22 replay still. |
Try attacking a target outside the Nuke Cannon's range and observe whether it creeps forward after deployment. |
7a918c9 to
9b29c05
Compare
I haven't verified this, but the posts in the issue suggest this is not an issue for Generals. Function |
|
Here is replay with this branch in RTS_DEBUG vs22 build. |
|
The fix is non-retail. It seems like you're testing without removing the retail compatibility guard. |
|
Ohhhhhhhhhhhhhhhhhhhh silly me...... time to go to sleep |
This PR prevents units from deploying when they're still moving. The issue is most notable with the Nuke Cannon, which deploys and fires just ahead reaching its goal position (see issue).
#176 (comment)
Notes: