Ejemplo n.º 1
0
 @Override
 public final int getPathData(
     final int x, final int y, final CellPathData[] cellPathData, final int index) {
   assert this.checkGetPathData(x, y, cellPathData);
   final CellPathData data = cellPathData[index];
   data.m_x = x;
   data.m_y = y;
   final int cellIndex = this.getIndex(x, y);
   data.m_z = this.m_zs[cellIndex];
   data.m_hollow = ((this.m_movLos[cellIndex] & 0x1) == 0x1);
   data.m_height = this.m_heights[cellIndex];
   data.m_cost = this.m_costs[cellIndex];
   data.m_murfinInfo = this.m_murfins[cellIndex];
   data.m_miscProperties = this.m_properties[cellIndex];
   return 1;
 }
 @Override
 public final int getPathData(
     final int x, final int y, final CellPathData[] cellPathData, final int index) {
   assert this.checkGetPathData(x, y, cellPathData);
   int numZ = 1;
   final CellPathData data = cellPathData[index];
   data.m_x = x;
   data.m_y = y;
   data.m_z = this.getZ(x, y);
   data.m_height = (byte) Math.max(0, data.m_z);
   data.m_cost = (byte) (super.isCellBlocked(x, y) ? -1 : 7);
   data.m_hollow = false;
   data.m_murfinInfo = (byte) this.getMurFinInfo(x, y);
   data.m_miscProperties = (byte) this.getMiscProperties(x, y);
   if (this.m_attachedBuilding.length != 0) {
     for (final AbstractBuildingStruct building : this.m_attachedBuilding) {
       final int result = building.getPathData(x, y, cellPathData, index + numZ);
       if (result != -1) {
         numZ += mergeSameAltitude(cellPathData, index, index + numZ, result);
       }
     }
   }
   return numZ;
 }