public bool isLandObstructedComposite(int x, int z) { ePassOverrideVal ovr = (ePassOverrideVal)getJaggedPassable(x, z); if (ovr == ePassOverrideVal.cPass_Passable) { return(false); } else if (ovr == ePassOverrideVal.cPass_Unpassable) { return(true); } return(isTileLandObstructed(x, z)); }
//---------------------------------- public void updateLandObstructionsPainted(int minXTile, int minZTile, int maxXTile, int maxZTile) { int numX = (int)((maxXTile - minXTile)); int numZ = (int)((maxZTile - minZTile)); for (int i = 0; i < numX; i++) { for (int j = 0; j < numZ; j++) { int xs = (int)BMathLib.Clamp((i + minXTile), 0, mNumXTiles - 1); int zs = (int)BMathLib.Clamp((minZTile + j), 0, mNumXTiles - 1); ePassOverrideVal p = (ePassOverrideVal)getJaggedPassable(xs, zs); if (p == ePassOverrideVal.cPass_Unpassable) { mSimLandObstructions[xs * mNumXTiles + zs] = true; } if (p == ePassOverrideVal.cPass_Passable) { mSimLandObstructions[xs * mNumXTiles + zs] = false; } } } }
public void setPassableBrushState(ePassOverrideVal v) { mCurrPassMode = v; }