Wintermute Engine > Fixed

PlayAnim() bug. When the first and the last frames are different

(1/4) > >>

Dionysius:
When the actor sits down and stands up it looks like engine plays twice the first frame of the animation. It is noticeable, that the actor twitches between "standup" and "idle" and between "sitdown" and "work".

Animations:
"sitdown"   - actor sits down at the computer
"work"       -  actor hits the keys of the keyboard (he is sitting)
"standup"   - actor stands up from the computer

Here is the exe-file, which demonstrates the bug: http://reptilesquest.mirgames.ru/download/bug.zip (5,2 Mb)

Press F1 - the actor will sit down.
Press F2 - he will stand up.

Code:

--- Code: ---if(Keyboard.KeyCode==VK_F1)
  {
  actor.PlayAnim("sitdown");
actor.IdleAnimName = "work";
  }
  else if(Keyboard.KeyCode==VK_F2)
  {
  actor.PlayAnim("standup");
actor.IdleAnimName = "none";
  }

--- End code ---
The actor has no "none" animation. I did this to show the bug better. It is noticeable, that at the end of the "standup" animation the first frame is played again.


Part of .act3d-file

--- Code: ---  ANIMATION
  {
    NAME="sitdown"
    LOOPING=FALSE
  }

  ANIMATION
  {
    NAME="standup"
    LOOPING=FALSE
  }
 
  ANIMATION
  {
    NAME="work"
    LOOPING=TRUE
  }

--- End code ---

Mnemonic:
That's nice and sweet, but you could you *please* provide me with sources of this demo? Compiled and bound to executable it's pretty much useless for testing... Thanks.

Dionysius:
Please, read the PM :)

Mnemonic:
Thank you!

Dionysius:
Fixed? Where I can take the patch?  :)

Navigation

[0] Message Index

[#] Next page

Go to full version