Enhance LOD model ID handling for entities#4871
Closed
Zephkek wants to merge 1 commit intomultitheftauto:masterfrom
Closed
Enhance LOD model ID handling for entities#4871Zephkek wants to merge 1 commit intomultitheftauto:masterfrom
Zephkek wants to merge 1 commit intomultitheftauto:masterfrom
Conversation
Added LOD model ID reporting for entities in CWorldSA.
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
Makes
processLineOfSightandtestSphereAgainstWorldreturn the entity's own model ID when a ray hits a LOD entity directly, instead of returning0.Motivation
Follow-up to #4863. For co-located HD/LOD placements (e.g., billboards), rays that hit the LOD entity itself previously returned
worldLODModelID = 0because LODs naturally havem_pLod == NULL.This patch fixes that by checking if the hit entity is a LOD (
numLodChildren > 0) and reporting its own ID. Standard non-LOD buildings (numLodChildren == 0) are unaffected and still correctly return0.Test Plan
BillBd3): Consistently returns LOD ID1266from all angles, regardless of whether the ray hits the HD or LOD entity first.0.m_pLod).Checklist