fix(m2): use USE_TEXTURE_COMBINERS flag for texture_combiner_combos#47
Merged
danielsreichenbach merged 3 commits intomainfrom Feb 16, 2026
Merged
Conversation
08a183b to
bfc977f
Compare
Fixed issues in convert() function where: - Flag-based check was incorrectly requiring both version >= Cataclysm AND flag set - Now properly respects flag regardless of source version - Tests updated to verify flag behavior works correctly Also fixed test issues: - Added flags parameter to create_test_header() - Made classic_header mutable in conversion test - Updated all test calls to include proper flags
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Fixed clippy error 'if_same_then_else' by removing redundant version check that was checking same condition as flag check. The USE_TEXTURE_COMBINERS flag alone determines whether texture_combiner_combos field exists, regardless of M2 version.
danielsreichenbach
added a commit
that referenced
this pull request
Feb 16, 2026
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.
Summary
Fixes incorrect parsing of
texture_combiner_combosfield in M2 models.Problem
The
texture_combiner_combosfield was being read based on M2 version (>= Cataclysm) instead of checking theUSE_TEXTURE_COMBINERSflag (0x0008).This caused two issues:
Solution
Changed all locations that check for
texture_combiner_combosto use theUSE_TEXTURE_COMBINERSflag instead of version:header.rs:parse()- Check flag for presenceheader.rs:new()- Field defaults to None (flag not set by default)header.rs:convert()- Preserve flag during version conversionmodel.rs:parse_chunked()- Check flag for presence in chunked M2 filesUpdated tests to properly set the flag when testing Cataclysm and Legion versions.
Issue
Fixes #35