Let's just warn and cope rather than sticking a fork in things.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2918 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
//
|
//
|
||||||
// $Id: TimedPath.java,v 1.3 2003/01/17 22:57:08 mdb Exp $
|
// $Id: TimedPath.java,v 1.4 2003/12/15 20:06:09 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.media.util;
|
package com.threerings.media.util;
|
||||||
|
|
||||||
|
import com.threerings.media.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A base class for path implementations that endeavor to move their
|
* A base class for path implementations that endeavor to move their
|
||||||
* pathables along a path in a specified number of milliseconds.
|
* pathables along a path in a specified number of milliseconds.
|
||||||
@@ -17,9 +19,10 @@ public abstract class TimedPath implements Path
|
|||||||
{
|
{
|
||||||
// sanity check some things
|
// sanity check some things
|
||||||
if (duration <= 0) {
|
if (duration <= 0) {
|
||||||
String errmsg = "Requested path with illegal duration (<=0) " +
|
Log.warning("Requested path with illegal duration (<=0) " +
|
||||||
"[duration=" + duration + "]";
|
"[duration=" + duration + "]");
|
||||||
throw new IllegalArgumentException(errmsg);
|
Thread.dumpStack();
|
||||||
|
duration = 1; // assume something short but non-zero
|
||||||
}
|
}
|
||||||
|
|
||||||
_duration = duration;
|
_duration = duration;
|
||||||
|
|||||||
Reference in New Issue
Block a user