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

Method InflictPain

src/SB/Game/zNPCTypeRobot.cpp:782–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

780}
781
782void zNPCRobot::InflictPain(S32 numHitPoints, S32 giveCreditToPlayer)
783{
784 if (numHitPoints < 0)
785 {
786 hitpoints = 0;
787 }
788 else
789 {
790 hitpoints -= numHitPoints;
791 }
792
793 hitpoints = (hitpoints > 0) ? hitpoints : 0;
794
795 if (!hitpoints && giveCreditToPlayer)
796 {
797 zNPCCommon::GiveReward();
798 }
799}
800
801F32 hyt_NightLightCurrent;
802

Callers 3

InputInfoMethod · 0.80
EnterMethod · 0.80
DieTheGoodDeathMethod · 0.80

Calls 1

GiveRewardFunction · 0.85

Tested by

no test coverage detected