Plays the sound for a player being damaged
| 720 | |
| 721 | // Plays the sound for a player being damaged |
| 722 | void PlayPlayerDamageSound(object *playerobj, int damage_type) { |
| 723 | int sound_handle; |
| 724 | |
| 725 | switch (damage_type) { |
| 726 | case PD_ENERGY_WEAPON: |
| 727 | sound_handle = SOUND_HIT_BY_ENERGY_WEAPON; |
| 728 | break; |
| 729 | case PD_MATTER_WEAPON: |
| 730 | sound_handle = SOUND_HIT_BY_MATTER_WEAPON; |
| 731 | break; |
| 732 | case PD_CONCUSSIVE_FORCE: |
| 733 | sound_handle = SOUND_HIT_BY_CONCUSSIVE_FORCE; |
| 734 | break; |
| 735 | case PD_WALL_HIT: |
| 736 | sound_handle = SOUND_PLAYER_HIT_WALL; |
| 737 | break; |
| 738 | case PD_VOLATILE_HISS: |
| 739 | sound_handle = SOUND_VOLATILE_HISS; |
| 740 | break; |
| 741 | |
| 742 | default: |
| 743 | Int3(); |
| 744 | case PD_MELEE_ATTACK: // melee sounds handled in aimain.cpp for now |
| 745 | case PD_NONE: |
| 746 | return; |
| 747 | } |
| 748 | |
| 749 | Sound_system.Play3dSound(sound_handle, SND_PRIORITY_HIGHEST, playerobj); |
| 750 | } |
| 751 | |
| 752 | // Plays the sound for a player being damaged |
| 753 | void PlayPlayerInvulnerabilitySound(object *playerobj) { |
no test coverage detected