Repository navigation
Don't draw the body's own head mesh when Mdl_SetVisualBody sets a head - #1090
Open
pieterdeschepper wants to merge 1 commit into
Open
pieterdeschepper wants to merge 1 commit into
pieterdeschepper wants to merge 1 commit into
Conversation
hum_Body_CookSmith.MDM has its own mesh on BIP01 HEAD (texture HUM_HEAD_VLK_V02_C1.TGA, which doesn't exist). It was drawn on top of the head from Mdl_SetVisualBody, so the faces of Stone, Snaf, Rice Lord, Viper, Balam and Omid flickered. In ZenGin the head visual replaces whatever the mesh puts on the head node. Bodies that set no head (golems, skeletons, UOS) keep their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Gothic 1 NPCs have a broken face: Stone, Snaf, Rice Lord, Viper, Balam and Omid. All of them use
hum_Body_CookSmith.Cause
HUM_BODY_COOKSMITH.MDMhas its own mesh attached toBIP01 HEAD. Its texture,HUM_HEAD_VLK_V02_C1.TGA, doesn't exist in the game data, so it is drawn withDEFAULT.TGA. The mesh is about the size of the real head, so it overlaps the head set byMdl_SetVisualBody(for Stone,Hum_Head_Pony) and the two fight around the face.The MDM is loaded without a skeleton, so
implSetBodyturns this attachment into a slot attachment on the head bone, next to the real head.Fix
In
MdlVisual::implSetBody, skip a body attachment on the head bone when a head is bound. ZenGin does the same: the head visual replaces whatever the mesh library put on the head node.Other meshes
I scanned all MDMs in the G1 data. Only nine have a mesh on
BIP01 HEAD:HUM_BODY_COOKSMITH,GOL_BODY,GOL_FIRE_BODY,GOL_ICE_BODY,SKE_BODY,SKE_BODY2,SKE_BODY3,SKE_FLY_BODYandUOS_BODY.All the non-human ones are passed an empty head in
Mdl_SetVisualBody, so they keep their own head. No armor MDM has a head attachment. I couldn't check Gothic 2 data.Testing
Tested in Gothic 1 (English) on macOS, in a local build.
🤖 Generated with Claude Code