MantisBT - Zandronum
View Issue Details
0004564Zandronum[All Projects] Bugpublic2025-09-27 11:512025-10-24 16:52
Fused 
 
highminorrandom
closedno change required 
 
 
0004564: Players with +NOMORPHLIMITATIONS randomly have weapons taken on map change.
The flag seems to have a bug where weapons do not persist. This seems semi-random but I personally have it persistently take the rocketlauncher when it does trigger.

During ZH2 testing, the super shotgun and jacksgun were randomly taken. This does not happen every time.

Happens both online and offline.
Open pk3s with Doom 2.
Puke 2 to give weapons.
Puke 3 to change map.

Weapons given: shotgun, chaingun, rocketlauncher
On map change, I personally never had the rocketlauncher anymore.
No tags attached.
zip MorphWeaponRemovalBug.zip (1,698) 2025-09-27 11:51
/tracker/file_download.php?file_id=3283&type=bug
Issue History
2025-09-27 11:51FusedNew Issue
2025-09-27 11:51FusedFile Added: MorphWeaponRemovalBug.zip
2025-10-24 03:22Ru5tK1ngNote Added: 0024591
2025-10-24 03:45Ru5tK1ngNote Edited: 0024591bug_revision_view_page.php?bugnote_id=24591#r14594
2025-10-24 03:51Ru5tK1ngNote Added: 0024592
2025-10-24 03:51Ru5tK1ngStatusnew => needs review
2025-10-24 16:52Ru5tK1ngNote Added: 0024593
2025-10-24 16:52Ru5tK1ngStatusneeds review => closed
2025-10-24 16:52Ru5tK1ngResolutionopen => no change required

Notes
(0024591)
Ru5tK1ng   
2025-10-24 03:22   
(edited on: 2025-10-24 03:45)
After some debugging, turns out this issue has nothing to do with level changes or +NOMORPHLIMITATIONS. I found the cause of why weapons disappear:

bool correctweapon = !!(player->MorphStyle & MORPH_LOSEACTUALWEAPON);

As per the ZDOOM wiki, that flag basically causes an unmorphing player to lose a weapon they obtained after they first morphed. Without it set, the engine just takes away whatever weapon was selected when unmorphing began. DECORATE cannot set MorphStyle flags but ZScript added the ability to.

I'm not sure what the best solution for this is. I will submit what I think makes the most sense currently given we don't have access to MorphStyle.

Edit: Turns out you set the MorphStyle via the morph power up definition.

(0024592)
Ru5tK1ng   
2025-10-24 03:51   
Should be fixed with this:'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/345 [^]'
(0024593)
Ru5tK1ng   
2025-10-24 16:52   
Closing:'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/345#note_489320 [^]'