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

Method Upd_ChuckBlast

src/SB/Game/zNPCHazard.cpp:1117–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115}
1116
1117void NPCHazard::Upd_ChuckBlast(F32 dt)
1118{
1119 HAZBall* ball = &this->custdata.ball;
1120
1121 ball->rad_cur = LERP(this->pam_interp, ball->rad_min, ball->rad_max);
1122
1123 if (this->flg_hazard & 0x2000 && !(globals.player.DamageTimer > 0.75f) &&
1124 this->pam_interp < 0.25f)
1125 {
1126 if (ColPlyrCyl(ball->rad_cur, 0.5f * ball->rad_cur))
1127 {
1128 HurtThePlayer();
1129 }
1130 }
1131
1132 if (this->flg_hazard & 0x8)
1133 {
1134 xSndPlay3D(xStrHash("Chu_splash"), 0.77f, 0.0f, 0x80, 0x0, &this->pos_hazard, 5.0f, 15.0f,
1135 SND_CAT_GAME, 0.0f);
1136 }
1137
1138 if (this->flg_hazard & 0x8)
1139 {
1140 WaterSplash(NULL);
1141 }
1142
1143 WavesOfEvil();
1144}
1145
1146void NPCHazard::WaterSplash(const xVec3* dir_norm)
1147{

Callers

nothing calls this directly

Calls 5

LERPFunction · 0.85
WaterSplashFunction · 0.85
WavesOfEvilFunction · 0.85
xSndPlay3DFunction · 0.70
xStrHashFunction · 0.50

Tested by

no test coverage detected