Skip to content

Plane bone indices truncate to eight bits when packed #43

Description

@cppctamber

Status:
Likely intentional and not replicatable with current Eve assets.

Source version:
Carbon v5.0.0, commit 342fbe595b572070e09b583a03e215011f5924e9

Notes
I do not have a runnable Carbon build: this failed a synthetic test for my JS version of trinity (which is now ignored).

Source
EvePlaneSet.h:136

135: uint8_t index;
136: uint8_t boneIndex;
137: uint8_t maskMapAtlasIndex;
138: uint8_t pickBufferID;

Description
Plane-set item bone indices are stored as int32_t, but the packed per-frame copy is uint8_t.

A bone index greater than 255 therefore truncates before it is used. An index of 256, for example, becomes 0 and can refer to a different valid bone rather than failing an upper-bound check.

This is not currently reachable in the space-object content I decoded. The largest skeleton I found contained 99 bones (Avatar: ship/amarr/titan/at1/at1_t1.gr2)

Related type inconsistency

Sprites and spotlights also start with signed item indices, but their packed runtime representations use uint32_t.
Their current upper-bound checks reject UINT32_MAX, so I found no present behavioral defect from those conversions.

int32_t m_boneIndex = -1;
uint32_t packedBoneIndex = m_boneIndex;

// -1 as int32_t       = 0xFFFFFFFF
// UINT32_MAX          = 0xFFFFFFFF
// Numeric uint32 value = 4294967295

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions