void AddFieldEffects(byte[,] from, byte[,] to, byte when, int iterations, byte step) { byte fronteer = when; int xsizem1 = MaxXPt - 1; while (iterations-- > 0) { byte self = (byte)(fronteer - step); for (int y = MaxYPt - 1; y > 0; y--) { for (int x = xsizem1; x > 0; x--) { byte b = from[x, y]; if (b > 2 && b < fronteer) { if (SimPathStore.Special(b) && b != SimPathStore.BRIDGY) { continue; } if (SurroundingBlocked0(x, y, fronteer, from) > 1) { to[x, y] = self; } } } } fronteer -= step; } }