mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-12 22:43:07 +00:00
Check that count is non-zero before decrementing it.
This commit is contained in:
parent
24a0a0c3bf
commit
0ed94ead4e
1 changed files with 1 additions and 1 deletions
|
|
@ -2585,7 +2585,7 @@ namespace MWMechanics
|
||||||
// if played with a count of 0, all objects play exactly once from start to stop.
|
// if played with a count of 0, all objects play exactly once from start to stop.
|
||||||
// But if the count is x > 0, actors and non-actors behave differently. actors will loop
|
// But if the count is x > 0, actors and non-actors behave differently. actors will loop
|
||||||
// exactly x times, while non-actors will loop x+1 instead.
|
// exactly x times, while non-actors will loop x+1 instead.
|
||||||
if (mPtr.getClass().isActor())
|
if (mPtr.getClass().isActor() && count > 0)
|
||||||
count--;
|
count--;
|
||||||
|
|
||||||
AnimationQueueEntry entry;
|
AnimationQueueEntry entry;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue