Closed jspjutNV closed 3 years ago
When targets are destroyed (i.e. damaged below 0 health w/o respawn) the hit audio isn't played. It seems like the audio play call is made, but the object is destroyed before it can complete playing. We should add a delayed destruction mechanic to prevent this from happening.
When targets are destroyed (i.e. damaged below 0 health w/o respawn) the hit audio isn't played. It seems like the audio play call is made, but the object is destroyed before it can complete playing. We should add a delayed destruction mechanic to prevent this from happening.
It seems like the destroyed sound also isn't playing. If possible, we should add a fix to both of these sounds not playing issues to this pull request.
Commit 34bf347 fixes the destroyed and hit sounds not playing when the target is destroyed at the same time.
The soundTable
approach is a good one to avoid issues like the one mentioned in #267.
I will approve this for now, but for the future we should consider:
FPSciApp::updateSession()
) rather than at target spawn timesoundTable
with the Session
(rather than FPSciApp
) to avoid memory bloatsoundTable
between sessions if we choose to keep it in FPSciApp
This PR closes #267
This includes the following:
firePeriod
.firePeriod
anddamage
(1 ms and 1% of target health/s).sound/fpsci_*.wav
sound/fpsci_destroy_300ms.wav
is available for longer destroy soundssound/fpsci_noise_50ms.wav
is useful for continuous-fire weaponssound/fpsci_ding_100ms.wav
sound/fpsci_destroy_150ms.wav
sound/fpsci_fire_100ms.wav
sound/fpsci_miss_100ms.wav