reset animation object before calling animation function in case the animation function reenables the animation
This commit is contained in:
parent
1fff973b46
commit
923c805fe5
|
@ -77,11 +77,11 @@ bool Animation::update(float timestamp)
|
||||||
{
|
{
|
||||||
overflow = timer.elapsed() - previous_step_time + overflow - _frame_length;
|
overflow = timer.elapsed() - previous_step_time + overflow - _frame_length;
|
||||||
previous_step_time = timer.elapsed();
|
previous_step_time = timer.elapsed();
|
||||||
step();
|
|
||||||
if (ending)
|
if (ending)
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
step();
|
||||||
if (overflow > _frame_length)
|
if (overflow > _frame_length)
|
||||||
{
|
{
|
||||||
overflow = 0;
|
overflow = 0;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
____/ \____ /| - Open source game framework licensed to freely use, |
|
____/ \____ /| - Open source game framework licensed to freely use, |
|
||||||
\ / / | copy, modify and sell without restriction |
|
\ / / | copy, modify and sell without restriction |
|
||||||
+--\ ^__^ /--+ | |
|
+--\ ^__^ /--+ | |
|
||||||
| ~/ \~ | | - created for <https://foam.shampoo.ooo> |
|
| ~/ \~ | | - created for <https://foam.ooo> |
|
||||||
| ~~~~~~~~~~~~ | +------------------------------------------------------+
|
| ~~~~~~~~~~~~ | +------------------------------------------------------+
|
||||||
| SPACE ~~~~~ | /
|
| SPACE ~~~~~ | /
|
||||||
| ~~~~~~~ BOX |/
|
| ~~~~~~~ BOX |/
|
||||||
|
|
Loading…
Reference in New Issue