mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
EMI: Chore duration 1000 means the chore should play infinitely.
This commit is contained in:
parent
3e322b67ba
commit
95c4650706
@ -70,7 +70,7 @@ void EMIChore::update(uint time) {
|
||||
|
||||
setKeys(_currTime, newTime);
|
||||
|
||||
if (newTime > _length) {
|
||||
if (_length >= 0.0f && newTime > _length) {
|
||||
if (!_looping && _fadeMode != Animation::FadeOut) {
|
||||
stop(0);
|
||||
}
|
||||
|
@ -61,7 +61,9 @@ void EMICostume::load(Common::SeekableReadStream *data) {
|
||||
float length = get_float(f);
|
||||
int numTracks = data->readUint32LE();
|
||||
|
||||
if (length < 1000)
|
||||
if (length == 1000)
|
||||
length = -1.0f;
|
||||
else
|
||||
length *= 1000;
|
||||
|
||||
EMIChore *chore = new EMIChore(name, i, this, (int)length, numTracks);
|
||||
@ -114,10 +116,6 @@ void EMICostume::load(Common::SeekableReadStream *data) {
|
||||
}
|
||||
delete[] componentName;
|
||||
}
|
||||
|
||||
// Some chores report duration 1000 while they have components with
|
||||
// keyframes after 1000. See elaine_wedding/take_contract, for example.
|
||||
chore->_length = ceil(length);
|
||||
}
|
||||
|
||||
_numComponents = components.size();
|
||||
|
Loading…
Reference in New Issue
Block a user