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

◆ EmitGolfCartWheelDust()

static void Terraria.Mount.EmitGolfCartWheelDust ( Player mountedPlayer,
Vector2 legSpot )
inlinestaticprivate

Definition at line 4369 of file Mount.cs.

4370 {
4371 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
4372 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
4373 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
4374 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
4375 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
4376 //IL_0030: Unknown result type (might be due to invalid IL or missing references)
4377 //IL_0036: Unknown result type (might be due to invalid IL or missing references)
4378 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
4379 //IL_004c: Unknown result type (might be due to invalid IL or missing references)
4380 //IL_0058: Unknown result type (might be due to invalid IL or missing references)
4381 //IL_0065: Unknown result type (might be due to invalid IL or missing references)
4382 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
4383 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
4384 //IL_00ae: Unknown result type (might be due to invalid IL or missing references)
4385 //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
4386 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
4387 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
4388 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
4389 //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
4390 //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
4391 //IL_00de: Unknown result type (might be due to invalid IL or missing references)
4392 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
4393 //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
4394 if (Main.rand.Next(5) != 0)
4395 {
4396 return;
4397 }
4398 Point p = (legSpot + new Vector2(0f, mountedPlayer.gravDir * 2f)).ToTileCoordinates();
4399 if (!WorldGen.InWorld(p.X, p.Y, 10))
4400 {
4401 return;
4402 }
4403 Tile tileSafely = Framing.GetTileSafely(p.X, p.Y);
4404 if (WorldGen.SolidTile(p))
4405 {
4406 int num = WorldGen.KillTile_GetTileDustAmount(fail: true, tileSafely, p.X, p.Y);
4407 if (num > 1)
4408 {
4409 num = 1;
4410 }
4411 Vector2 vector = default(Vector2);
4412 ((Vector2)(ref vector))._002Ector((float)(-mountedPlayer.direction), (0f - mountedPlayer.gravDir) * 1f);
4413 for (int i = 0; i < num; i++)
4414 {
4415 Dust obj = Main.dust[WorldGen.KillTile_MakeTileDust(p.X, p.Y, tileSafely)];
4416 obj.velocity *= 0.2f;
4417 obj.velocity += vector;
4418 obj.position = legSpot;
4419 obj.scale *= 0.8f;
4420 obj.fadeIn *= 0.8f;
4421 }
4422 }
4423 }

References Terraria.Main.dust, Terraria.Framing.GetTileSafely(), Terraria.WorldGen.InWorld(), Terraria.WorldGen.KillTile_GetTileDustAmount(), Terraria.WorldGen.KillTile_MakeTileDust(), Terraria.Main.rand, and Terraria.WorldGen.SolidTile().

Referenced by Terraria.Mount.UpdateFrame_GolfCart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: