Do some jiggery poker to make sure that if a path completes as a result of

our call to Path.init() we don't freak out. Also made a note that paths
will be ticked after being init()ed because that's the way it works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2011 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-12-02 20:11:24 +00:00
parent 55f40108b8
commit 0f0631f318
3 changed files with 11 additions and 7 deletions
@@ -1,5 +1,5 @@
//
// $Id: Sprite.java,v 1.53 2002/11/20 05:33:20 mdb Exp $
// $Id: Sprite.java,v 1.54 2002/12/02 20:11:24 mdb Exp $
package com.threerings.media.sprite;
@@ -285,7 +285,10 @@ public abstract class Sprite extends AbstractMedia
_path.init(this, _pathStamp = tickStamp);
}
return _path.tick(this, tickStamp);
// it's possible that as a result of init() the path completed and
// removed itself with a call to pathCompleted(), so we have to be
// careful here
return (_path == null) ? true : _path.tick(this, tickStamp);
}
// documentation inherited