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

Method Vibrate

src/SB/Game/zNPCTypeCommon.cpp:2848–2864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2846}
2847
2848void zNPCCommon::Vibrate(F32 ds2_cur, F32 ds2_max)
2849{
2850 F32 rat = ds2_cur / MAX(ds2_max, 1.0f);
2851
2852 if (rat < 0.4f)
2853 {
2854 this->Vibrate(NPC_VIBE_HARD, -1.0f);
2855 }
2856 else if (rat < 0.7f)
2857 {
2858 this->Vibrate(NPC_VIBE_NORM, -1.0f);
2859 }
2860 else if (rat < 1.0f)
2861 {
2862 this->Vibrate(NPC_VIBE_SOFT, -1.0f);
2863 }
2864}
2865
2866void zNPCCommon::Vibrate(en_npcvibe vibe, F32 duration)
2867{

Callers 3

PlayerTestsMethod · 0.80
EnterMethod · 0.80
HurtThePlayerMethod · 0.80

Calls 1

zPadAddRumbleFunction · 0.85

Tested by

no test coverage detected