-
Notifications
You must be signed in to change notification settings - Fork 82
[GEN][ZH] Fix USA Supply Drop Zone event triggering instantly when previously subdued while under construction #1281
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
base: main
Are you sure you want to change the base?
Conversation
There's also a divide by float 0, which is unfortunate. I'm going to check it out. I think it can be avoided. |
8be7806
to
fab3c9b
Compare
Tweaked so the disabling code in generals version is just the fixed code and all behind a non retail compatible include |
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp
Outdated
Show resolved
Hide resolved
fab3c9b
to
f3b12d8
Compare
Updated with the recent recommendations, works as expected and also prevents some visual and division issues. |
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.
Looks good.
Generals/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp
Outdated
Show resolved
Hide resolved
f3b12d8
to
46759a4
Compare
Fudged spelling in the comments. |
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.
Fix looks very correct.
The code comment has long width. Can be beautified.
46759a4
to
3a3a738
Compare
Tweaked the code comment a little, condensed it a touch. |
This PR is an alternate / updated implementation of an earlier orphaned PR
This PR prevents supply drops from instantly triggering when they were being subdued while under construction.
The issue stems from
m_nextCreationFrame
being incremented while the building is disabled.If the building is still subdued when transitioning from under construction to constructed, the above occurs before the timer gets inintialised inside the early return within the
if( m_nextCreationFrame == 0 )
block.This results in the
shouldCreate()
block getting fully triggered and a supply drop being createdThis PR also adds the subdual behaviour in a non retail block to the generals variant of the code as it was missing before.