MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zEntPlayer_GiveLevelPickupCurrentLevel

Function zEntPlayer_GiveLevelPickupCurrentLevel

src/SB/Game/zEntPlayer.cpp:4723–4742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4721}
4722
4723void zEntPlayer_GiveLevelPickupCurrentLevel(S32 quantity)
4724{
4725 U32 level = zSceneGetLevelIndex();
4726
4727 if (quantity < 0 && -quantity > (S32)globals.player.Inv_LevelPickups[level])
4728 {
4729 globals.player.Inv_LevelPickups[level] = 0;
4730 }
4731 else
4732 {
4733 globals.player.Inv_LevelPickups[level] += quantity;
4734 }
4735
4736 globals.player.Inv_LevelPickups_CurrentLevel = globals.player.Inv_LevelPickups[level];
4737
4738 if (quantity > 0)
4739 {
4740 zNPCMsg_AreaNotify(NULL, NPC_MID_PLYRSPATULA, 30.0f, 0x104, NPC_TYPE_UNKNOWN);
4741 }
4742}
4743
4744static F32 CalcJumpImpulse_Smooth(F32 g, F32 j, F32 h, F32 Tgc, F32 Tgs)
4745{

Callers

nothing calls this directly

Calls 2

zSceneGetLevelIndexFunction · 0.85
zNPCMsg_AreaNotifyFunction · 0.70

Tested by

no test coverage detected