/** * There could still be a problem here, but now it's the callers problem */ int getPhysicalTargetId() { MoveStep step = getLastStep(); if (step == null) { return -1; } Targetable target = step.getTarget(getGame()); if (target == null) { return -1; } return target.getTargetId(); }
for (int i = 0; i < temp.size(); i++) { MoveStep step = temp.elementAt(i); if ((step.getTargetPosition() != null) && (step.getTarget(getGame()) != null)) { step = new MoveStep(this, step.getType(), step.getTarget(getGame()), step.getTargetPosition()); } else if (step.getTarget(getGame()) != null) { step = new MoveStep(this, step.getType(), step.getTarget(getGame())); } else if (step.getRecoveryUnit() != -1) { step = new MoveStep(this, step.getType(), step.getRecoveryUnit(), -1);
Targetable targ = step.getTarget(game); if (game.getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_TACOPS_ZIPLINES) && (entity instanceof VTOL)