| 3037 | } |
| 3038 | |
| 3039 | S32 zNPCCommon::SndPlayFromSFX(xSFX* sfx, U32* sid_played) |
| 3040 | { |
| 3041 | U32 aidToPlay; |
| 3042 | NPCSndProp* sprop; |
| 3043 | |
| 3044 | this->SndKillSounds(2, 0); |
| 3045 | sprop = NPCS_SndFindProps(NPC_STYP_XSFXTALK); |
| 3046 | |
| 3047 | U32 xsid = sfx->asset->soundAssetID; |
| 3048 | |
| 3049 | aidToPlay = this->SndStart(xsid, sprop, MIN(sfx->asset->outerRadius, this->cfg_npc->rad_sound)); |
| 3050 | |
| 3051 | if (sid_played != NULL) |
| 3052 | { |
| 3053 | *sid_played = aidToPlay; |
| 3054 | } |
| 3055 | |
| 3056 | if (aidToPlay != 0) |
| 3057 | { |
| 3058 | return TRUE; |
| 3059 | } |
| 3060 | return FALSE; |
| 3061 | } |
| 3062 | |
| 3063 | S32 zNPCCommon::SndPlayRandom(en_NPC_SOUND sndtype) |
| 3064 | { |
no test coverage detected