We need to composite our action frames because it's possible that during

our tick we'll do something that invalidates our existing frames and we
need to composite the new ones in paint().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2127 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-01-13 23:54:19 +00:00
parent 0ae21770d0
commit d88a358f39
@@ -1,5 +1,5 @@
//
// $Id: CharacterSprite.java,v 1.39 2003/01/13 22:53:04 mdb Exp $
// $Id: CharacterSprite.java,v 1.40 2003/01/13 23:54:19 mdb Exp $
package com.threerings.cast;
@@ -180,6 +180,9 @@ public class CharacterSprite extends ImageSprite
// documentation inherited
public void paint (Graphics2D gfx)
{
// attempt to composite our action frames if necessary
compositeActionFrames();
if (_frames != null) {
decorateBehind(gfx);
// paint the image using _ibounds rather than _bounds which
@@ -197,7 +200,7 @@ public class CharacterSprite extends ImageSprite
* their frames. This is called lazily after we have been instructed
* to use a new action.
*/
protected void compositeActionFrames ()
protected final void compositeActionFrames ()
{
if (_frames == null) {
setFrames(_aframes.getFrames(_orient));