-
Notifications
You must be signed in to change notification settings - Fork 64
[GEN][ZH] Fix wrong class member set to INVALID_DRAWABLE_ID in ParticleUplinkCannonUpdate::createGroundToOrbitLaser() #729
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
Conversation
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 to me. Please add @helmutbuhler as Co-Author when squash-merging
This change has game mismatch maybe label. Does it need testing? |
Yeah the ones i labeled with possible mistmatch need a quick test to check they don't break compat. I will need to rebase them all once we confirm that the hashmap reversion fixes AI based replays. |
Hash map change is reverted, so this can be tested now. |
4e3cc83
to
750c552
Compare
Rebased with main and pushed so it is ready for testing. |
played golden replay on this one. vc6 no mismatch all worked until the end. |
750c552
to
05eec1d
Compare
…instead of m_groundToOrbitBeamID Co-authored-by: Helmut Buhler <buhler@8gadgetpack.net>
05eec1d
to
e0c4fc9
Compare
Tweaked to cleanup comment and ready to go. |
Did you find out if this changes any retail behavior? |
Not just yet, was checking the stealth one. |
Just testing and between this fix and retail there does not appear to be any visual difference or behaviour difference. |
I eyeballed the particle effects and did not observe a visual difference. Does this change fix any memory leaks? |
Looks like there is a chance that a memory leak could occur if an orbit to ground particle beam already exists. The first block appears to be there to destroy the existing beam. So i guess if the beam was interrupted and started again it would cleanup in that block then make a new one in the consecutive code. |
I could not get the game to fall into the block where the cleanup code for a current beam was setting the invalid drawable ID on the wrong drawable. I tried powering down the particle beam uplink with a microwave tank while it was firing, but even once it lost power it continued to fire till the end of the normal firing cycle. Sold power stations as well and it continued firing after losing power and never fell into that block. So i think there is little chance that this will have an issue with retail. Since the game always creates a new particle beam when firing, i think retail will just end up with some small memory leak if the obscure situation occurs that hits the relevant code. |
I put a breakpoint on this code and it never hits when shooting with the Particle Cannon. This indicates that it is a theoretical issue only. As far as I can tell this fixes no retail bug. |
Improved the title a bit. |
This fix was originally discovered by @helmutbuhler and split out of the original PR it was contained in.
Within
createGroundToOrbitLaser
the wrong ID variable was being set to invalid once the beam had been destroyed.This corrects that by setting the ID on the correct variable.