16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-09-01 11:39:18 +02:00

build 210905. vehicle startup logic enhancements, whois event enhancement, line breaker activation type, material shadow rank, shadow rank cutoff value, shadow angle cutoff value, minor bug fixes

This commit is contained in:
tmj-fstate
2021-09-05 21:09:46 +02:00
parent 2e86b3a5e9
commit 26d09440b0
28 changed files with 360 additions and 112 deletions

View File

@@ -197,7 +197,9 @@ openal_source::bind( sound_source *Controller, uint32_sequence Sounds, Iterator_
::alSourceQueueBuffers( id, static_cast<ALsizei>( buffers.size() ), buffers.data() );
::alSourceRewind( id );
// sound controller can potentially request playback to start from certain buffer point
if( controller->start() == 0.f ) {
// for multipart sounds the offset is applied only to last piece during playback
// for single sound we also make sure not to apply the offset to optional bookends
if( controller->start() == 0.f || is_multipart || controller->is_bookend( buffers.front() ) ) {
// regular case with no offset, reset bound source just in case
::alSourcei( id, AL_SAMPLE_OFFSET, 0 );
}