Skip to content

TD & Mine animation fix (proposed) - #592

Draft
jerethk wants to merge 2 commits into
TheForceEngine:masterfrom
jerethk:td_mine_anim_fix1
Draft

TD & Mine animation fix (proposed)#592
jerethk wants to merge 2 commits into
TheForceEngine:masterfrom
jerethk:td_mine_anim_fix1

Conversation

@jerethk

@jerethk jerethk commented Feb 15, 2026

Copy link
Copy Markdown
Collaborator

This is a subtle bug that has been present since the early days - it is seen when you use your final TD or mine.

@luciusDXL could you please compare with your original RE code?
I have reasoned out a fix which seems to give correct behaviour (cf. DOS), but I don't have access to the original code to check it. - thanks
It would be ideal if we can match the original code.

…l the throw is complete

It appears that lines 1023-1026 may have been added as a temporary hack in commit 0c0ff97
…ed with no ammo

The final else block may have been accidentally missed
@jerethk
jerethk marked this pull request as draft July 2, 2026 15:02
@jerethk
jerethk marked this pull request as ready for review July 3, 2026 17:22
@jerethk
jerethk requested a review from luciusDXL July 4, 2026 07:57
@jerethk jerethk changed the title TD & Mine animation fix TD & Mine animation fix (proposed) Jul 7, 2026

const u8* atten = RClassic_Fixed::computeLighting(weaponLightingZDist, 0);
TextureData* tex = weapon->frames[weapon->frame];
if (weapon->ammo && *weapon->ammo == 0 && (weapon->ammo == &s_playerInfo.ammoDetonator || weapon->ammo == &s_playerInfo.ammoMine))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this code to reset to Fist if you are out of ammo? @jerethk

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling Lucius may have added it as a temporary hack.
It doesn't give correct behaviour.
Look closely as you throw the last TD or mine in your inventory. The mine/TD vanishes incorrectly as soon as you start the action, rather than when the action is finished

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember this bug - so does this code removal fixes it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change as a whole fixes it - question is, whether it is true to the RE

@jerethk
jerethk marked this pull request as draft July 10, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants