Skip to content

Commit aacb9b7

Browse files
authored
Merge pull request #1751 from marauder2k9-torque/SFXEmitter-fix-tracknotupdating
Update sfxEmitter.cpp
2 parents dae2a77 + e4ff55b commit aacb9b7

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Engine/source/T3D/sfx/sfxEmitter.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ void SFXEmitter::unpackUpdate( NetConnection *conn, BitStream *stream )
521521
}
522522

523523
// track
524-
if (stream->readFlag()) // DirtyUpdateMask
524+
if (_readDirtyFlag(stream, Track)) // DirtyUpdateMask
525525
{
526526
initialUpdate = false;
527527
UNPACK_ASSET(conn, Sound);
@@ -1109,9 +1109,10 @@ void SFXEmitter::_renderCone( F32 radialIncrements, F32 sweepIncrements,
11091109

11101110
void SFXEmitter::play()
11111111
{
1112-
if( mSource )
1112+
if (mSource)
11131113
mSource->play();
1114-
else
1114+
1115+
if(isServerObject())
11151116
{
11161117
// By clearing the playback masks first we
11171118
// ensure the last playback command called
@@ -1128,7 +1129,8 @@ void SFXEmitter::pause()
11281129
{
11291130
if (mSource)
11301131
mSource->pause();
1131-
else
1132+
1133+
if(isServerObject())
11321134
{
11331135
// By clearing the playback masks first we
11341136
// ensure the last playback command called
@@ -1143,9 +1145,10 @@ void SFXEmitter::pause()
11431145

11441146
void SFXEmitter::stop()
11451147
{
1146-
if ( mSource )
1148+
if (mSource)
11471149
mSource->stop();
1148-
else
1150+
1151+
if(isServerObject())
11491152
{
11501153
// By clearing the playback masks first we
11511154
// ensure the last playback command called

0 commit comments

Comments
 (0)