ID:2595289
 
Resolved
Creating multiple animations in rapid succession could cause problems with the transitioning between them. This was an issue on both the client and server ends.
BYOND Version:513.1536
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 84.0.4147.105
Applies to:Dream Daemon & Dream Seeker
Status: Resolved (514.1562)

This issue has been resolved.
Descriptive Problem Summary:
When you try animating something that is already animating, the animation loops or skips the time variable on it.

Numbered Steps to Reproduce Problem:
1 - Animate something
2 - Try Animating it again whilst it is being animated

Code Snippet (if applicable) to Reproduce Problem:
Demo: https://mega.nz/file/ UFIzVQZR#XshHt0dS_5hUFjV1teciQ8ktdkd1NSxQXdLZ52aPYkc
Press the "Try Bug" and "TryBug2" verbs multiple times.

Expected Results:
No animation loops nor time skips

Actual Results:
Animation loops or time skips

Does the problem occur:
Every time? Or how often? Very very often
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
Never

Workarounds: None that I know of

Updated the thread
I don't understand the description of this bug at all. Can yu clarify?

Also is the test project still available?
In response to Lummox JR
This is that old animate bug we have talked about multiple times before, that you said you needed a test case that pinned it down more. Probably the same issue as http://www.byond.com/forum/post/2653084. Here is some gifs showing it happening that would explain it better:

https://i.imgur.com/Lir5sF9.gif (When pressing TryBug multiple times)
and
https://i.imgur.com/v6p0ZHG.gif (When pressing TryBug2 multiple times)

So when u try animating something that is already being animated, it makes the animation behave weirdly.

I've updated the thread with the correct link for the test case.
Unfortunately that demo still isn't clear. There is no consistent way to reproduce the issue except by trying to get lucky with timing.

The fact that you have to initiate the verb multiple times is a big part of the problem. There should be a single verb that can cause the issue to occur: animate, sleep a specific time, animate again. The degree to which the issue appears might vary based on minor aspects of the timing but if the times are long enough it should be easier to spot.
In response to Lummox JR
You can replace the TryBug verb with this code:
    TryBug()
while(1)
switch(rand(1,3))
if(1)
health=60
if(2)
health=40
if(3)
health=100
client.TgtHP.Update(src)
sleep(rand(0.1,2))


You won't have verb spammage anymore and the bug will 100% show itself. I just can't have a specific sleep time. What I imagine is that is has to be an smaller time than it takes to finish the animation that is currently going on.
Using random numbers does not solve the problem—it makes it worse. This is what I was talking about: you're making this an intermittent bug for no reason. Randomness is the exact opposite of what's needed here.

Seeing a bug is not the same as examining a bug to find out why it's happening. I need to examine the bug in order to fix it. That means it must be reproduced in a consistent way, where I can have a breakpoint ready to go.

There absolutely must be a specific sleep time that causes this to occur. Probably the sequence is animate, sleep, animate, sleep, animate, where the two sleep times are something you'll have to discover. It will be easier to find if you use much longer times for your animation as well. The verb that triggers this should not loop, but should return to its original point so it can be run again.
In response to Lummox JR
mob/verb
TryBug()
health=100
client.TgtHP.Update(src)
sleep(0)
health=60
client.TgtHP.Update(src)
sleep(0)
health=60
client.TgtHP.Update(src)
sleep(2)
health=40
client.TgtHP.Update(src)
sleep(20)//return to start after 2s
health=100
client.TgtHP.Update(src)


just replace the verb
it starts already on the 100, it flicks to the 60 before starting the animation, flicks back to the 100, and then it starts animating to the 60 and then 40.
Lummox JR resolved issue with message:
Creating multiple animations in rapid succession could cause problems with the transitioning between them. This was an issue on both the client and server ends.