explosion.inc.c (696B)
1 // explosion.inc.c 2 3 void bhv_explosion_init(void) { 4 create_sound_spawner(SOUND_GENERAL2_BOBOMB_EXPLOSION); 5 set_environmental_camera_shake(SHAKE_ENV_EXPLOSION); 6 7 o->oOpacity = 255; 8 } 9 10 void bhv_explosion_loop(void) { 11 s32 i; 12 13 if (o->oTimer == 9) { 14 if (find_water_level(o->oPosX, o->oPosZ) > o->oPosY) { 15 for (i = 0; i < 40; i++) { 16 spawn_object(o, MODEL_WHITE_PARTICLE_SMALL, bhvBobombExplosionBubble); 17 } 18 } else { 19 spawn_object(o, MODEL_SMOKE, bhvBobombBullyDeathSmoke); 20 } 21 22 o->activeFlags = ACTIVE_FLAG_DEACTIVATED; 23 } 24 25 o->oOpacity -= 14; 26 27 cur_obj_scale((f32) o->oTimer / 9.0f + 1.0); 28 }