Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

Re: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by MartinHowe » Tue Nov 05, 2024 6:02 pm

SPZ1 wrote: Tue Nov 05, 2024 2:28 pm I just noticed that none of these style flags are listed in the wiki (for MorphActor and UnMorphActor anyways). Also thanks for the tip!
Yeah, they're in the entry for MorphProjectile because that's where it all started, originally with Heretic and HeXen; I'd suggest reading that whole page and everything morph-related that it links to, to give yourself a full overview of the morphing subsystem; the entry for (Un)MorphActor does reference them ("Except for tid, the parameters are the same special properties defined by the MorphProjectile class. They are summarised above; for full details and additional notes, please refer to the MorphProjectile class") but it's a lot to take in so you might have missed that bit. Have fun :)

Re: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by SPZ1 » Tue Nov 05, 2024 2:28 pm

I just noticed that none of these style flags are listed in the wiki (for MorphActor and UnMorphActor anyways). Also thanks for the tip!

Re: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by MartinHowe » Tue Nov 05, 2024 1:18 am

SPZ1 wrote: Mon Nov 04, 2024 12:51 pm I found that if you morph to a class that has it's Player.MorphWeapon set to the current weapon you are using when morphing, it will be removed from the player's inventory when the player unmorphs.
There's a style flag for that: MRF_LOSEACTUALWEAPON — When the player unmorphs, the actual weapon given by the Player.MorphWeapon property is taken away.

When a player unmorphs, the engine by default takes away whichever weapon the player is wielding at the time; the assumptions behind this are no longer valid due to enhancements to the game made by ZDoom. With the MRF_LOSEACTUALWEAPON flag, the player only loses the weapon given upon morphing; furthermore, if the weapon was one that the player already had before morphing, it is not taken away at all. This new behavior is actually a bug fix, but must be activated via a style flag because existing mods may depend upon the old behavior.

Re: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by SPZ1 » Mon Nov 04, 2024 4:43 pm

OK. Well I'll get to it!

Re: Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by Rachael » Mon Nov 04, 2024 1:31 pm

That is not a bug. If you're actively using the same weapon for both a morph and normal use - don't do that! Make some inherit variants, at least.

Player.MorphWeapon will remove weapon from inventory if identical when player unmorphs

by SPZ1 » Mon Nov 04, 2024 12:51 pm

I found that if you morph to a class that has it's Player.MorphWeapon set to the current weapon you are using when morphing, it will be removed from the player's inventory when the player unmorphs.

Top