Skip to content

Wrong pad field order in CColPoint.h #317

Description

@plasmaXZ

Taking a look at this:

And comparing it with the MTA version: https://github.com/multitheftauto/mtasa-blue/blob/d40ac185de4e4da7dfbd37a54ada66e96837f888/Client/game_sa/CColPointSA.h#L30

We can see that the first pad field comes right before the second one, which in turn is right before m_fDepth.
I did some tests and it checks out, before reordering the fields, I get wrong values for m_nSurfaceTypeB and m_nPieceTypeB (possibly for lighting too, but that I didn't test).

Before the fix: shooting any vehicle's tire would give you a value of 255 for m_nPieceTypeB.
After the fix: shooting the tires now gets the expected value between 13 and 16.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions