Buggy code:
@ Override protected void unsetFromVicinities ( ) { } @ Override public float getBoundingRadius ( ) { } @ Override public boolean isTagged ( ) { } @ Override public void setTagged ( boolean tagged ) { } @ Override public float getMaxLinearAcceleration ( ) { } @ Override public void setMaxLinearAcceleration ( float maxLinearAcceleration ) { } @ Override public float getMaxAngularSpeed ( ) { } @ Override public void setMaxAngularSpeed ( float maxAngularSpeed ) { } @ Override public float getMaxAngularAcceleration ( ) { } @ Override public void setMaxAngularAcceleration ( float maxAngularAcceleration ) { } @ Override public Vector2 getLinearVelocity ( ) { } @ Override public float getAngularVelocity ( ) { } @ Override public float getZeroLinearSpeedThreshold ( ) { } @ Override public void setZeroLinearSpeedThreshold ( float value ) { } @ Override public float getMaxLinearSpeed ( ) { } @ Override public void setMaxLinearSpeed ( float maxLinearSpeed ) { } @ Override public void update ( ) { } @ Override protected void setPosition ( float x , float z ) { } @ Override public void setCurrentTile ( Tile currentTile ) { } public void stop ( ) { } public void goTo ( Tile targetTile , Vector3 coordinates ) { endTargetLoc . setPosition ( coordinates ) ; ePath . clear ( ) ; pathIndex = 0 ; usePathFinder = false ; if ( ( endTargetLoc . dot ( eastVect ) ) > ( ( maxEast ) - ( ( projWidth ) // 2.0F ) ) ) { bufferVect . set ( eastVect ) . scl ( ( ( maxEast ) - ( ( projWidth ) // 2.0F ) ) ) ; bufferVect2 . set ( southVect ) . scl ( endTargetLoc . dot ( southVect ) ) ; bufferVect . add ( bufferVect2 ) ; endTargetLoc . setPosition ( bufferVect ) ; } if ( ( endTargetLoc . dot ( eastVect ) ) < ( ( maxWest ) + ( ( projWidth ) // 2.0F ) ) ) { bufferVect . set ( eastVect ) . scl ( ( ( maxWest ) + ( ( projWidth ) // 2.0F ) ) ) ; bufferVect2 . set ( southVect ) . scl ( endTargetLoc . dot ( southVect ) ) ; bufferVect . add ( bufferVect2 ) ; endTargetLoc . setPosition ( bufferVect ) ; } if ( ( endTargetLoc . dot ( southVect ) ) > ( maxSouth ) ) { bufferVect . set ( eastVect ) . scl ( endTargetLoc . dot ( eastVect ) ) ; bufferVect2 . set ( southVect ) . scl ( maxSouth ) ; bufferVect . add ( bufferVect2 ) ; endTargetLoc . setPosition ( bufferVect ) ; } if ( ( endTargetLoc . dot ( southVect ) ) < ( ( maxNorth ) + ( projHeight ) ) ) { bufferVect . set ( eastVect ) . scl ( endTargetLoc . dot ( eastVect ) ) ; bufferVect2 . set ( southVect ) . scl ( ( ( maxNorth ) + ( projHeight ) ) ) ; bufferVect . add ( bufferVect2 ) ; endTargetLoc . setPosition ( bufferVect ) ; } targetTile = gameMap . getTile ( endTargetLoc . getX ( ) , endTargetLoc . getZ ( ) ) ; targetLoc . set ( endTargetLoc ) ; if ( targetTile != ( currentTile ) ) { if ( ! ( currentTile . canAccess ( targetTile ) ) ) { targetTile = AStar . findClosestTile ( currentTile , targetTile ) ; endTargetLoc . set ( targetTile ) ; targetLoc . set ( endTargetLoc ) ; } ePath . clear ( ) ; ePath = pathfinder . calculatePath ( currentTile , targetTile , ePath ) ; if ( ! ( followExactPath ) ) { if ( ( ePath . getCount ( ) ) >= 3 ) { pathIndex = 1 ; targetLoc . set ( ePath . get ( pathIndex ) ) ; usePathFinder = true ; this . setSeekTarget ( targetLoc ) ; } else { pathIndex = ( ePath . getCount ( ) ) - 1 ; usePathFinder = false ; this . assignFinalTarget ( endTargetLoc ) ; } } else { <START_BUG> pathIndex = 0 ; <END_BUG> targetLoc . set ( ePath . get ( pathIndex ) ) ; usePathFinder = true ; this . setArriveTarget ( targetLoc ) ; } } else { this . assignFinalTarget ( targetLoc ) ; } moving = ( ( targetLoc . getX ( ) ) != ( position . x ) ) || ( ( targetLoc . getZ ( ) ) != ( position . z ) ) ; } protected void calculateSteering ( float time ) { } protected Tile applySteering ( float time , Vector2 linearAcceleration ) { } protected void adjustSpeedForAltitude ( float time , Tile otherTile ) { } protected void checkMovement ( float time , Tile targetTile ) { } protected void handleNextTileIsNull ( float time ) { } protected void handleNextTileContainsEntity ( Tile nextTile ) { } protected void handleNextTileIsEdge ( float time , Tile nextTile ) { } protected void handleNextTileIsSafe ( float time , Tile nextTile ) { } protected void handleNextTileIsUnsafe ( float time , Tile nextTile ) { } protected void handleNextTileIsNotConnected ( float time , Tile nextTile ) { } protected void move ( float time ) { } protected void handleEndOfMovement ( ) { } protected void followPath ( ) { } protected void updateTerrainInfo ( ) { } protected void calculateAltitudeVelocityDrag ( float time , Tile nextTile , Vector2 tentativePos ) { } protected void setSeekTarget ( Location < Vector2 > targetLocation ) { } protected void setArriveTarget ( Location < Vector2 > targetLocation ) { } protected void assignFinalTarget ( Location < Vector2 > targetLocation ) { } protected void updateVelocity ( Vector2 velocity2D ) { } protected float getTerrainAdjustment ( TerrainType terrain ) { } private void updateOrientation ( ) { } protected float implyOrientationFromVelocity ( ) { }

Fix:
pathIndex = ( ( position2D ) != ( ePath . get ( 0 ) . getPosition ( ) ) ) ? 0 : 1 ;