Explorar o código

Update sfxSound.cpp

irei1as %!s(int64=7) %!d(string=hai) anos
pai
achega
0419ed0475
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      Engine/source/sfx/sfxSound.cpp

+ 3 - 2
Engine/source/sfx/sfxSound.cpp

@@ -693,8 +693,9 @@ DefineEngineMethod( SFXSound, setPosition, void, ( F32 position ),,
    "playback will resume at the given position when play() is called.\n\n"
    "@param position The new position of the play cursor (in seconds).\n" )
 {
-   if( position >= 0 && position <= object->getDuration() )
-      object->setPosition( position * 1000.0f );
+   position *= 1000.0f;
+   if( position >= 0 && position < object->getDuration() )
+      object->setPosition( position );
 }
 
 //-----------------------------------------------------------------------------