-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed unnecessary ``ChannelPlaying`` checks from ``RemoveNPC``, ``KillSounds``, ``ResumeSounds`` and ``PauseSounds`` function. We don't need to check if the sound is playing, enough to know does it exist or not; - Added ``CoughCHN``, ``VomitCHN`` and ``RadioCHN`` to ``PauseSounds``, ``ResumeSounds`` and ``KillSounds`` function; - Added channel existing check for ``UpdateSoundOrigin(2)`` and ``UpdateStreamSoundOrigin`` function, so we don't need to check manually if the sound is existing. First, we don't need to try apply channel functions to null channel and produce unnecessary calculations. Second, added sound playing check because we need to use these functions only when the sound is playing. - Completely remove sound from memory. As you know, ``FreeSound``, ``StopChannel`` doesn't finally frees the memory, so I added ``= 0`` lines. - Fixed spamable ``Failed to find stream Sound: Unknown Stream`` console error appeared in: 1) SCP-079's chamber after finishing ``Speech.ogg`` sound; 2) Gate B area after playing ``AlphaWarheadsFail.ogg`` sound; 3) I'm not sure, but sometimes I saw this error for SCP-096 because I noticed ``n\SoundChn2_IsStream = 2`` line that should have ``True`` value instead of ``2``. Maybe it shouldn't, who knows ¯\_(ツ)_/¯ ; Also always reset ``_isStream`` parameter while removing a channel for preventing any confuses in ``UpdateStreamSounds`` function. Also added more sound exist checks for preventing ``Unknow stream`` error; - Added ``ChannelVolume (Chn, 0)`` line to to prevent sound from being assigned a negative volume when sound emitter out of range. - Separated some conditions. First, we should check if the sounds exist. After, check if the sound is stream sound. Don't waste your time time to check them both. Note: - ``RadioCHN`` channel placed only in ``KillSounds`` because placing in ``ResumeSounds`` and ``PauseSounds`` doesn't affect on the channel. To do!
- Loading branch information
Showing
4 changed files
with
217 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.