code: public boolean tick (Pathable pable, long timestamp)
      {
          // figure out how far along this segment we should be
          long msecs = timestamp - _nodestamp;
          float travpix = msecs * _vel;
          float pctdone = travpix / _seglength;
  
          // if we've moved beyond the end of the path, we need to adjust
          // the timestamp to determine how much time we used getting to the
          // end of this node, then move to the next one
          if (pctdone >= 1.0) {
              long used = (long)(_seglength / _vel);
              return headToNextNode(pable, _nodestamp + used, timestamp);
          }
  
          // otherwise we position the pathable along the path
          int ox = pable.getX();
          int oy = pable.getY();
          int nx = _src.loc.x + (int)((_dest.loc.x - _src.loc.x) * pctdone);
          int ny = _src.loc.y + (int)((_dest.loc.y - _src.loc.y) * pctdone);
  
  //         Log.info("Moving pathable [msecs=" + msecs + ", pctdone=" + pctdone +
  //                  ", travpix=" + travpix + ", seglength=" + _seglength +
  //                  ", dx=" + (nx-ox) + ", dy=" + (ny-oy) + "].");
  
          // only update the pathable's location if it actually moved
          if (ox != nx || oy != ny) {
              pable.setLocation(nx, ny);
              return true;
          }
  
          return false;
      }
docs: documentation inherited