Skip to content

RageModelDecoder: allow zero bounding-sphere radius (ASSET-69) - #21

Closed
JavierBlanco23 wants to merge 1 commit into
breadbbbb:mainfrom
JavierBlanco23:asset-69-allow-zero-radius
Closed

JavierBlanco23 wants to merge 1 commit into
breadbbbb:mainfrom
JavierBlanco23:asset-69-allow-zero-radius

Conversation

@JavierBlanco23

Copy link
Copy Markdown

Allows radius == 0 (radius is >= 0 and < 1_000_000 instead of > 0) in RageModelDecoder.LooksLikeDrawableHeader (Core/RageModelDecoder.cs:124).

ValidBounds(min, max) already permits degenerate min == max bounds, and valid drawable dictionaries in core_restofworld.rpf carry a bounding-sphere radius of 0.

Verification (ItsNotRexed/Leonida ASSET-69, counts only, no game data)

  • Built tools/rpf9dump/rpf9dump.csproj -c Release (0 warnings, 0 errors).
  • core_restofworld.rpf (1,024 scan candidates), cache cleared before each run:
    • Before (radius > 0): Recovered = 873, NotRecovered = 151, Entries = 885, ok = 885, fail = 0, ModelDecodeFailures = {}.
    • After (radius >= 0): Recovered = 884 (+11), NotRecovered = 140 (-11), Entries = 896 (+11), ok = 896, fail = 0, ModelDecodeFailures = {}.
  • Environment: Windows 11, .NET 8 SDK. AI-assisted: Yes.

@breadbbbb breadbbbb left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is already present in current main at e293917, through #12 and release 1.2. LooksLikeDrawableHeader already accepts finite radius zero (radius is >= 0 and < 1_000_000); #12 also added the preview-bounds fallback for empty declared bounds.

There is no additional behavior here relative to the current target. Recommend closing this PR as superseded by #12 rather than merging the same fix again.

@JavierBlanco23

Copy link
Copy Markdown
Author

Thanks @breadbbbb! Closing as superseded by #12 / e293917.

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.

3 participants