96 {
99 {
100 return;
101 }
106 int num = (int)(Main.screenPosition.X / 16f - 1f);
107 int num2 = (int)((Main.screenPosition.X + (float)Main.screenWidth) / 16f) + 2;
108 int num3 = (int)(Main.screenPosition.Y / 16f - 1f);
109 int num4 = (int)((Main.screenPosition.Y + (float)Main.screenHeight) / 16f) + 2;
113 num4 += 20;
114 if (num < 0)
115 {
116 num = 0;
117 }
118 if (num2 > Main.maxTilesX)
119 {
120 num2 = Main.maxTilesX;
121 }
122 if (num3 < 0)
123 {
124 num3 = 0;
125 }
126 if (num4 > Main.maxTilesY)
127 {
128 num4 = Main.maxTilesY;
129 }
130 for (
int i = num;
i < num2;
i++)
131 {
132 for (int j = num3; j < num4; j++)
133 {
134 Tile tile = Main.tile[
i, j];
135 if (tile == null)
136 {
138 Main.tile[
i, j] = tile;
139 }
140 if (!tile.active())
141 {
142 continue;
143 }
144 if (tile.halfBrick())
145 {
146 Tile tile2 = Main.tile[
i, j - 1];
147 if (tile2 == null)
148 {
150 Main.tile[
i, j - 1] = tile2;
151 }
152 if (tile2.liquid < 16 ||
WorldGen.SolidTile(tile2))
153 {
154 Tile tile3 = Main.tile[
i - 1, j];
155 if (tile3 == null)
156 {
158 Main.tile[
i - 1, j] = tile3;
159 }
160 Tile tile4 = Main.tile[
i + 1, j];
161 if (tile4 == null)
162 {
164 Main.tile[
i + 1, j] = tile4;
165 }
166 if ((tile3.liquid > 160 || tile4.liquid > 160) && ((tile3.liquid == 0 && !
WorldGen.SolidTile(tile3) && tile3.slope() == 0) || (tile4.liquid == 0 && !
WorldGen.SolidTile(tile4) && tile4.slope() == 0)) &&
currentMax <
qualityMax)
167 {
169 if (tile2.lava() || tile4.lava() || tile3.lava())
170 {
172 }
173 else if (tile2.honey() || tile4.honey() || tile3.honey())
174 {
176 }
177 else if (tile2.shimmer() || tile4.shimmer() || tile3.shimmer())
178 {
180 }
181 else
182 {
184 }
188 }
189 }
190 }
191 if (tile.type == 196)
192 {
193 Tile tile5 = Main.tile[
i, j + 1];
194 if (tile5 == null)
195 {
197 Main.tile[
i, j + 1] = tile5;
198 }
200 {
205 }
206 }
207 if (tile.type == 460)
208 {
209 Tile tile6 = Main.tile[
i, j + 1];
210 if (tile6 == null)
211 {
213 Main.tile[
i, j + 1] = tile6;
214 }
216 {
221 }
222 }
223 }
224 }
225 }
WaterfallData[] waterfalls