Checking if (foo = bar) is begging for disaster.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@708 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Dave Hoover
2008-08-05 21:13:43 +00:00
parent b52db86905
commit 6c91e7cb96
2 changed files with 12 additions and 11 deletions
@@ -269,7 +269,8 @@ public class DropSprite extends Sprite
*/ */
public void setBouncing (boolean bouncing) public void setBouncing (boolean bouncing)
{ {
if (_bouncing = bouncing) { _bouncing = bouncing;
if (_bouncing) {
// if we've activated bouncing, shift the sprite slightly to // if we've activated bouncing, shift the sprite slightly to
// illustrate its new state // illustrate its new state
shiftForBounce(); shiftForBounce();
@@ -328,7 +329,7 @@ public class DropSprite extends Sprite
// Log.info("getPercentDone [timestamp=" + timestamp + // Log.info("getPercentDone [timestamp=" + timestamp +
// ", rowstamp=" + _rowstamp + ", msecs=" + msecs + // ", rowstamp=" + _rowstamp + ", msecs=" + msecs +
// ", travpix=" + travpix + ", pctdone=" + pctdone + // ", travpix=" + travpix + ", pctdone=" + pctdone +
// ", vel=" + _vel + "]."); // ", vel=" + _vel + "].");
return pctdone; return pctdone;
@@ -480,8 +480,8 @@ public class EditorScenePanel extends StageScenePanel
boolean changed; boolean changed;
if (_ptile instanceof ObjectTile) { if (_ptile instanceof ObjectTile) {
if (changed = updateObjectTileCoords( changed = updateObjectTileCoords(x, y, _ppos, (ObjectTile)_ptile);
x, y, _ppos, (ObjectTile)_ptile)) { if (changed) {
_pscobj.relocateObject(_metrics, _ppos.x, _ppos.y); _pscobj.relocateObject(_metrics, _ppos.x, _ppos.y);
} }
} else { } else {
@@ -532,7 +532,7 @@ public class EditorScenePanel extends StageScenePanel
setShowFlags(SHOW_TIPS, true); setShowFlags(SHOW_TIPS, true);
} }
} }
@Override @Override
public void keyReleased (KeyEvent e) public void keyReleased (KeyEvent e)
{ {
@@ -572,7 +572,7 @@ public class EditorScenePanel extends StageScenePanel
/** /**
* Sets a base tile at the specified position in the scene (in tile * Sets a base tile at the specified position in the scene (in tile
* coordinates). * coordinates).
* *
* @return - if the tile was successfully set * @return - if the tile was successfully set
*/ */
public boolean setBaseTile (int fqTileId, int x, int y) public boolean setBaseTile (int fqTileId, int x, int y)
@@ -614,7 +614,7 @@ public class EditorScenePanel extends StageScenePanel
/** /**
* Sets an object tile at the specified position in the scene (in tile coordinates). * Sets an object tile at the specified position in the scene (in tile coordinates).
* *
* @return - the created object or null if an identical object was already in that spot. * @return - the created object or null if an identical object was already in that spot.
*/ */
public ObjectInfo addObject (ObjectTile tile, int fqTileId, int x, int y) public ObjectInfo addObject (ObjectTile tile, int fqTileId, int x, int y)
@@ -626,7 +626,7 @@ public class EditorScenePanel extends StageScenePanel
/** /**
* Adds the given object to the scene. * Adds the given object to the scene.
* *
* @return the added object or null if an identical object was already in that spot. * @return the added object or null if an identical object was already in that spot.
*/ */
public ObjectInfo addObject (ObjectInfo oinfo) public ObjectInfo addObject (ObjectInfo oinfo)
@@ -648,7 +648,7 @@ public class EditorScenePanel extends StageScenePanel
/** /**
* Deletes the object tile at the specified tile coordinates. * Deletes the object tile at the specified tile coordinates.
* *
* @return true - if a matching object was found and deleted. * @return true - if a matching object was found and deleted.
*/ */
public boolean deleteObject (SceneObject scobj) public boolean deleteObject (SceneObject scobj)
@@ -666,7 +666,7 @@ public class EditorScenePanel extends StageScenePanel
/** /**
* Delete the given object from the scene. * Delete the given object from the scene.
* *
* @return true - if a matching object was found and deleted. * @return true - if a matching object was found and deleted.
*/ */
public boolean deleteObject (ObjectInfo info) public boolean deleteObject (ObjectInfo info)
@@ -940,7 +940,7 @@ public class EditorScenePanel extends StageScenePanel
paintLocation(gfx, (StageLocation)port.loc, Color.BLUE, paintLocation(gfx, (StageLocation)port.loc, Color.BLUE,
port.equals(_scene.getDefaultEntrance())); port.equals(_scene.getDefaultEntrance()));
} }
/** /**
* Paint the specified StageLocation * Paint the specified StageLocation
*/ */