| 3185 | } |
| 3186 | |
| 3187 | void cruise_bubble::state_missle_explode::start_effects() |
| 3188 | { |
| 3189 | U32 rand; |
| 3190 | U32 emit_max; |
| 3191 | U32 emit_min; |
| 3192 | zShrapnelAsset* shrap; |
| 3193 | |
| 3194 | // current_tweak loaded into r30 instead of r29. |
| 3195 | zFX_SpawnBubbleBlast(&get_missle_mat()->pos, current_tweak->blast.emit, |
| 3196 | current_tweak->blast.radius, current_tweak->blast.vel, |
| 3197 | current_tweak->blast.rand_vel); |
| 3198 | |
| 3199 | xVec3 scale = { 1.0f, 1.0f, 1.0f }; |
| 3200 | |
| 3201 | explode_decal.emit(*get_missle_mat(), scale, -1); |
| 3202 | |
| 3203 | shrap = shared.droplet_shrapnel; |
| 3204 | if ((shrap != NULL) && (shrap->initCB != NULL)) |
| 3205 | { |
| 3206 | emit_max = current_tweak->droplet.emit_min; |
| 3207 | emit_min = current_tweak->droplet.emit_max; |
| 3208 | |
| 3209 | if (emit_max >= emit_min) |
| 3210 | { |
| 3211 | emit_max = emit_min; |
| 3212 | } |
| 3213 | else |
| 3214 | { |
| 3215 | rand = xrand(); |
| 3216 | emit_max += (rand / 0x2000) - |
| 3217 | ((rand / 0x2000) / (emit_min - emit_max)) * (emit_min - emit_max); |
| 3218 | } |
| 3219 | |
| 3220 | ((state_missle_explode*)(emit_max)) |
| 3221 | ->reset_quadrants((S32)current_tweak, current_tweak->droplet.vel_angle); |
| 3222 | |
| 3223 | for (U32 i = 0; i < emit_max; i++) |
| 3224 | { |
| 3225 | // shrap->initCB(shrap, shared.missle_model, NULL, cb_droplet); |
| 3226 | } |
| 3227 | } |
| 3228 | } |
| 3229 | |
| 3230 | void cruise_bubble::state_missle_explode::cb_droplet(zFrag* frag, zFragAsset* asset) |
| 3231 | { |
no test coverage detected