Skip to content

zNPCTypeAmbient: make zNPCAmbient::PhysicsFlags const - #771

Merged
SquareMan merged 1 commit into
bfbbdecomp:mainfrom
joeyballentine:zNPCAmbient-physicsflags-const
Aug 3, 2026
Merged

zNPCTypeAmbient: make zNPCAmbient::PhysicsFlags const#771
SquareMan merged 1 commit into
bfbbdecomp:mainfrom
joeyballentine:zNPCAmbient-physicsflags-const

Conversation

@joeyballentine

@joeyballentine joeyballentine commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

The mangled name of this function is PhysicsFlags__11zNPCAmbientCFv. Dropping the const makes it mangle as PhysicsFlags__11zNPCAmbientFv which does not match. Adding const to the PhysicsFlags signatures properly makes it match.

Found via an LLM scan of the repo.

xNPCBasic declares `virtual U8 PhysicsFlags() const`, but the zNPCAmbient
override dropped the qualifier, so it never overrode anything -- it introduced a
second virtual and mangled as PhysicsFlags__11zNPCAmbientFv. The retail object
only has the const form.

    zNPCTypeAmbient  40/57 -> 41/57 functions

zNPCTypeAmbient is the only unit that changes; nothing regresses.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

main/SB/Game/zNPCTypeAmbient

Section From To Bytes
📈 .data 98.02% 98.46% +4
📈 .text 65.81% 65.91% +7
Function From To Bytes
zNPCAmbient::PhysicsFlags() const 0.00% 100.00% +8

@joeyballentine
joeyballentine marked this pull request as ready for review August 3, 2026 17:03
@SquareMan
SquareMan merged commit d226f0a into bfbbdecomp:main Aug 3, 2026
5 checks passed
@joeyballentine
joeyballentine deleted the zNPCAmbient-physicsflags-const branch August 27, 2026 20:57
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.

2 participants