Skip to content

Name an unknown material group UNDEF for the ground sound - #1069

Merged
Try merged 2 commits into
Try:masterfrom
Reveares:fix/material-group-name
Nov 19, 2026
Merged

Try merged 2 commits into
Try:masterfrom
Reveares:fix/material-group-name

Conversation

@Reveares

Copy link
Copy Markdown
Contributor

Npc::emitSoundGround indexed the 7-entry MaterialGroupNames[] with the ground's material group, which ZenKit reads from the world archive unchecked. A world whose materials carry a group of 7 or more read past the array and handed a wild pointer to string_frm. Setting every material of NEWWORLD to 7 crashed the game on the first NPC footstep.

The name now comes from a switch shaped like materialTag, as every other MaterialGroup mapping does, so any group outside the known ones names UNDEF, and the array is gone.

@Reveares
Reveares force-pushed the fix/material-group-name branch from 6f45c45 to 0ae18a1 Compare November 19, 2026 23:11
@Try
Try merged commit a64417e into Try:master Nov 19, 2026
7 checks passed
@Try

Try commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Merged, thanks!

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