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

◆ MudWallRunner()

static void Terraria.WorldGen.MudWallRunner ( int i,
int j )
inlinestatic

Definition at line 67262 of file WorldGen.cs.

67263 {
67264 //IL_0093: Unknown result type (might be due to invalid IL or missing references)
67265 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
67266 //IL_00be: Unknown result type (might be due to invalid IL or missing references)
67267 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
67268 //IL_01ac: Unknown result type (might be due to invalid IL or missing references)
67269 //IL_01ad: Unknown result type (might be due to invalid IL or missing references)
67270 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
67271 //IL_01b3: Unknown result type (might be due to invalid IL or missing references)
67272 //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
67273 //IL_01f9: Unknown result type (might be due to invalid IL or missing references)
67274 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
67275 //IL_0134: Unknown result type (might be due to invalid IL or missing references)
67276 //IL_023e: Unknown result type (might be due to invalid IL or missing references)
67277 //IL_025f: Unknown result type (might be due to invalid IL or missing references)
67278 double num = genRand.Next(8, 21);
67279 double num2 = genRand.Next(8, 33);
67280 double num3 = num2;
67281 Vector2D val = default(Vector2D);
67282 val.X = i;
67283 val.Y = j;
67284 Vector2D val2 = default(Vector2D);
67285 val2.X = (double)genRand.Next(-10, 11) * 0.1;
67286 val2.Y = (double)genRand.Next(-10, 11) * 0.1;
67287 while (num > 0.0 && num3 > 0.0)
67288 {
67289 double num4 = num * (num3 / num2);
67290 num3 -= 1.0;
67291 int num5 = (int)(val.X - num4 * 0.5);
67292 int num6 = (int)(val.X + num4 * 0.5);
67293 int num7 = (int)(val.Y - num4 * 0.5);
67294 int num8 = (int)(val.Y + num4 * 0.5);
67295 if (num5 < 0)
67296 {
67297 num5 = 0;
67298 }
67299 if (num6 > Main.maxTilesX)
67300 {
67301 num6 = Main.maxTilesX;
67302 }
67303 if (num7 < 0)
67304 {
67305 num7 = 0;
67306 }
67307 if (num8 > Main.maxTilesY)
67308 {
67309 num8 = Main.maxTilesY;
67310 }
67311 for (int k = num5; k < num6; k++)
67312 {
67313 for (int l = num7; l < num8; l++)
67314 {
67315 if (Math.Abs((double)k - val.X) + Math.Abs((double)l - val.Y) < num * 0.5 * (1.0 + (double)genRand.Next(-10, 11) * 0.015) && (double)l > Main.worldSurface)
67316 {
67317 Main.tile[k, l].wall = 0;
67318 }
67319 }
67320 }
67321 val += val2;
67322 val2.X += (double)genRand.Next(-10, 11) * 0.05;
67323 if (val2.X > 1.0)
67324 {
67325 val2.X = 1.0;
67326 }
67327 if (val2.X < -1.0)
67328 {
67329 val2.X = -1.0;
67330 }
67331 val2.Y += (double)genRand.Next(-10, 11) * 0.05;
67332 if (val2.Y > 1.0)
67333 {
67334 val2.Y = 1.0;
67335 }
67336 if (val2.Y < -1.0)
67337 {
67338 val2.Y = -1.0;
67339 }
67340 }
67341 }
static double Abs(double value)
static UnifiedRandom genRand
Definition WorldGen.cs:1215

References System.Math.Abs(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Main.worldSurface, ReLogic.Utilities.Vector2D.X, and ReLogic.Utilities.Vector2D.Y.

Referenced by Terraria.GameContent.Biomes.JunglePass.GenerateHolesInMudWalls().