Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RetargetSurfaceHistory()

static void Terraria.GameContent.Biomes.TerrainPass.RetargetSurfaceHistory ( SurfaceHistory history,
int targetX,
double targetHeight )
inlinestaticprivate

Definition at line 358 of file TerrainPass.cs.

359 {
360 for (int i = 0; i < history.Length / 2; i++)
361 {
362 if (history[history.Length - 1] <= targetHeight)
363 {
364 break;
365 }
366 for (int j = 0; j < history.Length - i * 2; j++)
367 {
368 double num = history[history.Length - j - 1];
369 num -= 1.0;
370 history[history.Length - j - 1] = num;
371 if (num <= targetHeight)
372 {
373 break;
374 }
375 }
376 }
377 for (int k = 0; k < history.Length; k++)
378 {
379 double worldSurface = history[history.Length - k - 1];
380 RetargetColumn(targetX - k, worldSurface);
381 }
382 }
static void RetargetColumn(int x, double worldSurface)

References Terraria.GameContent.Biomes.TerrainPass.SurfaceHistory.Length, and Terraria.GameContent.Biomes.TerrainPass.RetargetColumn().

Referenced by Terraria.GameContent.Biomes.TerrainPass.ApplyPass().