Skip to content
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

Heretic: Fix Translucency Option affecting MT_MUMMYLEADERGHOST #1273

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

Noseey
Copy link

@Noseey Noseey commented Feb 11, 2025

Related Commit:
23d3281

Change Description

Its a bit of a late finding, but I saw today, that the replacement of the doomednum with the sprite name in the above mentioned commit has an undesired side-effect: The sprite (and also attack-states) are both present for the MT_MUMMYLEADER and MT_MUMMYLEADERGHOST, meaning that the ghost versions now also get a base-sprite drawn when the translucency-option is active. This is not intended, so I would like to hereby revert this change and use the unique identifier again to distinguish those otherwise similar enemy-types.

@fabiangreffrath
Copy link
Owner

Thank you! I have no problem merging this, but do you think you could keep both monster types apart by their states - or are these again identical?

@Noseey
Copy link
Author

Noseey commented Feb 11, 2025

Yes, they also share the states. In fact, they are almost idendical apart from the doomednum and the shadow-flag. An alternative could be to check for the shadowflag together with the sprite.

    {                           // MT_MUMMYLEADER
     45,                        // doomednum
     S_MUMMY_LOOK1,             // spawnstate
     100,                       // spawnhealth
     S_MUMMY_WALK1,             // seestate
     sfx_mumsit,                // seesound
     8,                         // reactiontime
     sfx_mumat1,                // attacksound
     S_MUMMY_PAIN1,             // painstate
     64,                        // painchance
     sfx_mumpai,                // painsound
     S_MUMMY_ATK1,              // meleestate
     S_MUMMYL_ATK1,             // missilestate
     S_NULL,                    // crashstate
     S_MUMMY_DIE1,              // deathstate
     S_NULL,                    // xdeathstate
     sfx_mumdth,                // deathsound
     12,                        // speed
     22 * FRACUNIT,             // radius
     62 * FRACUNIT,             // height
     75,                        // mass
     0,                         // damage
     sfx_mumact,                // activesound
     MF_SOLID | MF_SHOOTABLE | MF_COUNTKILL,    // flags
     MF2_FOOTCLIP | MF2_PASSMOBJ        // flags2
     },

    {                           // MT_MUMMYLEADERGHOST
     46,                        // doomednum
     S_MUMMY_LOOK1,             // spawnstate
     100,                       // spawnhealth
     S_MUMMY_WALK1,             // seestate
     sfx_mumsit,                // seesound
     8,                         // reactiontime
     sfx_mumat1,                // attacksound
     S_MUMMY_PAIN1,             // painstate
     64,                        // painchance
     sfx_mumpai,                // painsound
     S_MUMMY_ATK1,              // meleestate
     S_MUMMYL_ATK1,             // missilestate
     S_NULL,                    // crashstate
     S_MUMMY_DIE1,              // deathstate
     S_NULL,                    // xdeathstate
     sfx_mumdth,                // deathsound
     12,                        // speed
     22 * FRACUNIT,             // radius
     62 * FRACUNIT,             // height
     75,                        // mass
     0,                         // damage
     sfx_mumact,                // activesound
     MF_SOLID | MF_SHOOTABLE | MF_COUNTKILL | MF_SHADOW,        // flags
     MF2_FOOTCLIP | MF2_PASSMOBJ        // flags2
     },

I got the name wrong in the description, I will update that.

@Noseey Noseey changed the title Heretic: Fix Translucency Option affecting MT_MUMMYGHOST Heretic: Fix Translucency Option affecting MT_MUMMYLEADERGHOST Feb 11, 2025
@fabiangreffrath
Copy link
Owner

An alternative could be to check for the shadowflag together with the sprite.

Since this is both, the only difference between the two monsters and the sole reason why the base sprite should not be drawn for the ghost variant, I think this would be the appropriate fix.

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

Thank you!

@Noseey
Copy link
Author

Noseey commented Feb 12, 2025

I have changed it to also check the absence of the MF_SHADOW flag. Since the normal MT_MUMMYGHOST doesn't have a firing state and thus never reaches the frame 24, these conditions should now isolate the MT_MUMMYLEADER correctly.

@fabiangreffrath fabiangreffrath merged commit 8fda40a into fabiangreffrath:master Feb 12, 2025
6 checks passed
@Noseey Noseey deleted the Heretic_Ghostmummy_fix branch February 12, 2025 20:59
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.

2 participants