Make sure we stop the drop sprite from dropping at high velocity when we

suspend the puzzle. Also added some logging to debug the occasional
obscure situation where the puzzle is suspended at just the right time to
prevent the drop block from properly starting up again when we resume.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3057 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-07-10 05:18:59 +00:00
parent a19b77e68b
commit a6f57205d7
@@ -1,5 +1,5 @@
//
// $Id: DropControllerDelegate.java,v 1.3 2004/02/25 14:48:44 mdb Exp $
// $Id: DropControllerDelegate.java,v 1.4 2004/07/10 05:18:59 mdb Exp $
package com.threerings.puzzle.drop.client;
@@ -703,6 +703,11 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
// ", commit=" + commit + ", pctdone=" + pctdone + "].");
if (_dboard.isValidDrop(rows, cols, pctdone)) {
if (commit) {
Log.info("Not valid drop [source=" + source +
", commit=" + commit + ", atTop=" + atTop +
", pctdone=" + pctdone + "].");
}
return false;
}
@@ -939,6 +944,18 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
return false;
}
// documentation inherited
public void didSuspend ()
{
super.didSuspend();
// make sure our drop sprite is not dropping quickly
if (_blocksprite != null) {
_fastDrop = false;
_blocksprite.setVelocity(getPieceVelocity(false));
}
}
// documentation inherited
public void didResume (long delta)
{