sm64pc/src/game/behaviors/explosion.inc.c

27 lines
646 B
C
Raw Normal View History

2019-08-25 04:46:40 +00:00
// explosion.c.inc
void bhv_explosion_init(void) {
2019-10-05 19:08:05 +00:00
create_sound_spawner(SOUND_GENERAL2_BOBOMB_EXPLOSION);
2020-01-03 15:38:57 +00:00
set_environmental_camera_shake(SHAKE_ENV_EXPLOSION);
2019-08-25 04:46:40 +00:00
o->oOpacity = 255;
}
void bhv_explosion_loop(void) {
s32 i;
if (o->oTimer == 9) {
if (find_water_level(o->oPosX, o->oPosZ) > o->oPosY) {
for (i = 0; i < 40; i++)
spawn_object(o, MODEL_WHITE_PARTICLE_SMALL, bhvBobombExplosionBubble);
} else
spawn_object(o, MODEL_SMOKE, bhvBobombBullyDeathSmoke);
o->activeFlags = 0;
}
o->oOpacity -= 14;
2020-03-02 03:42:52 +00:00
cur_obj_scale((f32) o->oTimer / 9.0f + 1.0);
2019-08-25 04:46:40 +00:00
}