Don't dirty our bounds if setLocation() is called with our current
location. This could possibly break something that depended on the old behavior, so we'll have to watch for broken things and make them right. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3822 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -65,6 +65,10 @@ public abstract class Animation extends AbstractMedia
|
||||
// documentation inherited
|
||||
public void setLocation (int x, int y)
|
||||
{
|
||||
if (_bounds.x == x && _bounds.y == y) {
|
||||
return; // no-op
|
||||
}
|
||||
|
||||
// start with our current bounds
|
||||
Rectangle dirty = new Rectangle(_bounds);
|
||||
|
||||
|
||||
@@ -150,6 +150,10 @@ public abstract class Sprite extends AbstractMedia
|
||||
// documentation inherited
|
||||
public void setLocation (int x, int y)
|
||||
{
|
||||
if (x == _ox && y == _oy) {
|
||||
return; // no-op
|
||||
}
|
||||
|
||||
// start with our current bounds
|
||||
Rectangle dirty = new Rectangle(_bounds);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user