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

◆ DirtyRockRunner()

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

Definition at line 67181 of file WorldGen.cs.

67182 {
67183 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
67184 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
67185 //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
67186 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
67187 //IL_01be: Unknown result type (might be due to invalid IL or missing references)
67188 //IL_01bf: Unknown result type (might be due to invalid IL or missing references)
67189 //IL_01c0: Unknown result type (might be due to invalid IL or missing references)
67190 //IL_01c5: Unknown result type (might be due to invalid IL or missing references)
67191 //IL_01ea: Unknown result type (might be due to invalid IL or missing references)
67192 //IL_020b: Unknown result type (might be due to invalid IL or missing references)
67193 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
67194 //IL_0136: Unknown result type (might be due to invalid IL or missing references)
67195 //IL_0250: Unknown result type (might be due to invalid IL or missing references)
67196 //IL_0271: Unknown result type (might be due to invalid IL or missing references)
67197 double num = genRand.Next(2, 6);
67198 double num2 = genRand.Next(5, 50);
67199 double num3 = num2;
67200 Vector2D val = default(Vector2D);
67201 val.X = i;
67202 val.Y = j;
67203 Vector2D val2 = default(Vector2D);
67204 val2.X = (double)genRand.Next(-10, 11) * 0.1;
67205 val2.Y = (double)genRand.Next(-10, 11) * 0.1;
67206 while (num > 0.0 && num3 > 0.0)
67207 {
67208 double num4 = num * (num3 / num2);
67209 num3 -= 1.0;
67210 int num5 = (int)(val.X - num4 * 0.5);
67211 int num6 = (int)(val.X + num4 * 0.5);
67212 int num7 = (int)(val.Y - num4 * 0.5);
67213 int num8 = (int)(val.Y + num4 * 0.5);
67214 if (num5 < 0)
67215 {
67216 num5 = 0;
67217 }
67218 if (num6 > Main.maxTilesX)
67219 {
67220 num6 = Main.maxTilesX;
67221 }
67222 if (num7 < 0)
67223 {
67224 num7 = 0;
67225 }
67226 if (num8 > Main.maxTilesY)
67227 {
67228 num8 = Main.maxTilesY;
67229 }
67230 for (int k = num5; k < num6; k++)
67231 {
67232 for (int l = num7; l < num8; l++)
67233 {
67234 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) && Main.tile[k, l].wall == 2)
67235 {
67236 Main.tile[k, l].wall = 59;
67237 }
67238 }
67239 }
67240 val += val2;
67241 val2.X += (double)genRand.Next(-10, 11) * 0.05;
67242 if (val2.X > 1.0)
67243 {
67244 val2.X = 1.0;
67245 }
67246 if (val2.X < -1.0)
67247 {
67248 val2.X = -1.0;
67249 }
67250 val2.Y += (double)genRand.Next(-10, 11) * 0.05;
67251 if (val2.Y > 1.0)
67252 {
67253 val2.Y = 1.0;
67254 }
67255 if (val2.Y < -1.0)
67256 {
67257 val2.Y = -1.0;
67258 }
67259 }
67260 }
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, ReLogic.Utilities.Vector2D.X, and ReLogic.Utilities.Vector2D.Y.