Skip to content

TEST: Assert MDL skin width is multiple of four#108

Merged
MotoLegacy merged 1 commit into
mainfrom
cypress/skin_width_check
Jun 29, 2025
Merged

TEST: Assert MDL skin width is multiple of four#108
MotoLegacy merged 1 commit into
mainfrom
cypress/skin_width_check

Conversation

@MotoLegacy

Copy link
Copy Markdown
Member

Description of Changes


Doing some digging trying to produce failure for the bad mesh in nzp-team/nzportable#1194 I found some additional safe guards that some early Quake engines have with the skin width required to be a multiple of four. While height can be arbitrarily set this way (and we do so on quite a few models, this probably should be revisited) width cannot behave this way. So I added a check to safeguard against this which fails on our broken model.

Visual Sample


[INFO]: Verifying MDL model [./common/broken_mesh.mdl]..
  + MAGIC: [IDPO]
  + VERSION: [6]
  + SKIN WIDTH: [127]
    - ERROR: Skin width is not multiple of four!
  + SKIN HEIGHT: [59]
  + VERTICES: [113]
  + TRIANGLES: [174]
  + FRAMES: [47]
  - ERROR: Invalid header for MDL [./common/broken_mesh.mdl]!
[ERROR]: FAILED to validate [1] MDL models!

Checklist


  • I have thoroughly tested my changes to the best of my ability
  • I confirm I have not contributed anything that would impact Nazi Zombies: Portable's licensing and usage
  • This Pull Request fixes a critical issue that should be reviewed and merged as soon as possible

@MotoLegacy MotoLegacy marked this pull request as ready for review June 29, 2025 17:45
@MotoLegacy MotoLegacy merged commit 3bd70d1 into main Jun 29, 2025
8 checks passed
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.

1 participant