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

Function zEntPlayer_Damage

src/SB/Game/zEntPlayer.cpp:4468–4485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4466}
4467
4468S32 zEntPlayer_Damage(xBase* src, U32 damage, const xVec3* knockback)
4469{
4470 S32 newDamage = zEntPlayer_Damage(src, damage);
4471
4472 if (!newDamage)
4473 {
4474 return false;
4475 }
4476
4477 if (knockback)
4478 {
4479 globals.player.ent.frame->vel.x = knockback->x;
4480 globals.player.ent.frame->vel.y = knockback->y;
4481 globals.player.ent.frame->vel.z = knockback->z;
4482 }
4483
4484 return true;
4485}
4486
4487S32 zEntPlayer_DamageNPCKnockBack(xBase* src, U32 damage, xVec3* npcPos)
4488{

Callers 6

ProcessMethod · 0.70
ProcessMethod · 0.70
HurtThePlayerMethod · 0.70
xEntBoulder_UpdateFunction · 0.50

Calls 5

zEntTeleportBox_playerInFunction · 0.85
zEntPlayer_SNDStopFunction · 0.85
BoulderRollDoneCBFunction · 0.70
zEntPlayerControlOnFunction · 0.70
zEntPlayer_SNDPlayRandomFunction · 0.70

Tested by

no test coverage detected