Play the explosion sound for this object
| 1305 | } |
| 1306 | // Play the explosion sound for this object |
| 1307 | void PlayObjectExplosionSound(object *objp) { |
| 1308 | int sound; |
| 1309 | if (objp->type == OBJ_DOOR) { |
| 1310 | sound = SOUND_ROBOT_EXPLODE_1; |
| 1311 | } else { |
| 1312 | ASSERT(IS_GENERIC(objp->type)); |
| 1313 | sound = Object_info[objp->id].sounds[GSI_EXPLODE]; |
| 1314 | if (sound == SOUND_NONE_INDEX) { // check for default |
| 1315 | if (objp->type == OBJ_BUILDING) |
| 1316 | sound = SOUND_BUILDING_EXPLODE; |
| 1317 | else |
| 1318 | sound = (ps_rand() > D3_RAND_MAX / 2) ? SOUND_ROBOT_EXPLODE_1 : SOUND_ROBOT_EXPLODE_2; |
| 1319 | } |
| 1320 | } |
| 1321 | if (sound != -1) |
| 1322 | Sound_system.Play3dSound(sound, SND_PRIORITY_HIGH, objp); |
| 1323 | } |
| 1324 | const char *dead_object_types[] = { |
| 1325 | "swatter", "swatter(deadmodel)", "Hangturret", "Securityturret(DEAD)", |
| 1326 | "Lance", "Lance(DEAD)", "L10 swatter", "swatter(deadmodel)", |
no test coverage detected