mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Update asyncPacketStream.h
This commit is contained in:
parent
0380b95492
commit
ae82c93ad0
|
|
@ -281,9 +281,22 @@ void AsyncPacketBufferedInputStream< Stream, Packet >::_requestNext()
|
|||
IResettable* resettable = dynamic_cast< IResettable* >( s );
|
||||
if( resettable )
|
||||
{
|
||||
IPositionable< U32 >* positionable = dynamic_cast< IPositionable< U32 >* >( &Deref( stream ) );
|
||||
U32 pos;
|
||||
if(positionable)
|
||||
pos = positionable->getPosition();
|
||||
|
||||
resettable->reset();
|
||||
isEOS = false;
|
||||
this->mNumRemainingSourceElements = mNumTotalSourceElements;
|
||||
|
||||
if( positionable )
|
||||
{
|
||||
positionable->setPosition(pos);
|
||||
U32 dur = stream->getDuration();
|
||||
if(dur != 0) //avoiding division by zero? not needed, probably
|
||||
this->mNumRemainingSourceElements -= (U32)(mNumTotalSourceElements*(F32)pos/dur);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( isEOS )
|
||||
|
|
|
|||
Loading…
Reference in a new issue