Cleaned up some bits that assumed that _pidx was always > 0.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3576 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -400,7 +400,7 @@ public abstract class PuzzleController extends GameController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// refuse to start the action if our puzzle view is hidden
|
// refuse to start the action if our puzzle view is hidden
|
||||||
if (!_panel.getBoardView().isShowing()) {
|
if (_pidx != -1 && !_panel.getBoardView().isShowing()) {
|
||||||
Log.warning("Refusing to start action on hidden puzzle.");
|
Log.warning("Refusing to start action on hidden puzzle.");
|
||||||
Thread.dumpStack();
|
Thread.dumpStack();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -455,7 +455,8 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_ctrl.isGameOver() && _puzobj.isActivePlayer(_pidx)) {
|
if (_pidx != -1 && !_ctrl.isGameOver() &&
|
||||||
|
_puzobj.isActivePlayer(_pidx)) {
|
||||||
// create the next block
|
// create the next block
|
||||||
_blocksprite = createNextBlock();
|
_blocksprite = createNextBlock();
|
||||||
if (_blocksprite != null) {
|
if (_blocksprite != null) {
|
||||||
@@ -620,7 +621,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
|
|||||||
*/
|
*/
|
||||||
protected void updateSelfSummary ()
|
protected void updateSelfSummary ()
|
||||||
{
|
{
|
||||||
if (_puzobj != null && _puzobj.summaries != null) {
|
if (_pidx != -1 && _puzobj != null && _puzobj.summaries != null) {
|
||||||
BoardSummary bsum = _puzobj.summaries[_pidx];
|
BoardSummary bsum = _puzobj.summaries[_pidx];
|
||||||
bsum.setBoard(_dboard);
|
bsum.setBoard(_dboard);
|
||||||
bsum.summarize();
|
bsum.summarize();
|
||||||
|
|||||||
Reference in New Issue
Block a user