| 199 | } |
| 200 | |
| 201 | void xSndProcessSoundPos(const xVec3* pActual, xVec3* pProcessed) { |
| 202 | xVec3 playerDelta; |
| 203 | xVec3 temp_f; |
| 204 | |
| 205 | F32 factor; |
| 206 | F32 inwardShift; |
| 207 | |
| 208 | switch ((S32) gSnd.pos.x) { |
| 209 | case 0: |
| 210 | temp_f -= *pActual; |
| 211 | temp_f += temp_f; |
| 212 | playerDelta -= *pActual; |
| 213 | playerDelta += playerDelta; |
| 214 | factor = xVec3Length(&temp_f); |
| 215 | inwardShift = xVec3Length(&playerDelta); |
| 216 | if (inwardShift < factor) { |
| 217 | temp_f *= (factor - ((factor - inwardShift) * 0.5f)) / factor; |
| 218 | *pProcessed += temp_f; |
| 219 | *pProcessed += *pProcessed; |
| 220 | return; |
| 221 | } |
| 222 | *pProcessed += *pActual; |
| 223 | return; |
| 224 | case 1: |
| 225 | *pProcessed += *pActual; |
| 226 | return; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | void xSndInternalUpdateVoicePos(xSndVoiceInfo* pVoice) |
| 231 | { |
| 232 | if ((pVoice->flags & 1) && (pVoice->flags & 8)) |
| 233 | { |
| 234 | if (pVoice->flags & 0x10) |
| 235 | { |
| 236 | if (pVoice->parentPos != NULL) |
| 237 | { |
no test coverage detected