Skip to content

Conversation

@pavledev
Copy link
Collaborator

@pavledev pavledev commented Feb 5, 2026

No description provided.

s_Actor->m_fCurrentHitPoints = 0.f;
}

return HookResult<bool>(HookAction::Continue());
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of having HookResult<bool>(HookAction::Continue()); (or similar) in all these, you could write `{ HookAction::Continue() }; to keep it a bit more concise.

Comment on lines 685 to 687
const bool s_IsInfiniteAmmoEnabled = !s_LocalHitman.m_pInterfaceRef->IsCustomFlagEnabled(
static_cast<ECustomFlags>(0x2000000)
);
Copy link
Owner

Choose a reason for hiding this comment

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

Should this be a constant / enum value and this checked be moved to a function in ZHitman5, so it can be re-used?

if (s_AmmoInPocket > 0) {
s_AmmoInPocket -= s_HM5ItemWeapon->GetMagazineCapacity();

s_Inventory->m_nAmmoInPocket[static_cast<size_t>(s_AmmoType)] = s_AmmoInPocket;
Copy link
Owner

Choose a reason for hiding this comment

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

Are we guaranteed to have an element in at this index?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

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