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

Function zRumbleStartDistance

src/SB/Game/zRumble.cpp:93–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void zRumbleStartDistance(S32 pad_id, F32 real_dist, F32 max_dist, _tagRumbleType type, F32 maxTime)
94{
95 if (real_dist < 0.0f)
96 {
97 real_dist = 0.0f;
98 }
99 else if (real_dist > max_dist)
100 {
101 real_dist = max_dist;
102 }
103
104 maxTime *= (1.0f - real_dist / max_dist);
105 if (maxTime > 0.0f)
106 {
107 xPadAddRumble(pad_id, type, maxTime, 1, 1);
108 }
109}
110
111void zRumbleStartEntDistance(xEnt* ent, F32 dist, _tagRumbleType type, F32 maxTime)
112{

Callers 3

zRumbleStartEntDistanceFunction · 0.70
zPlatformEventCBFunction · 0.70
xFXFireworksUpdateFunction · 0.50

Calls 1

xPadAddRumbleFunction · 0.85

Tested by

no test coverage detected