Definition at line 2859 of file Collision.cs.
2860 {
2862 int num = (int)(
Position.X / 16f) - 1;
2863 int num2 = (int)((
Position.X + (
float)Width) / 16f) + 2;
2865 int num4 = (int)((
Position.Y + (
float)Height) / 16f) + 2;
2866 if (num < 0)
2867 {
2868 num = 0;
2869 }
2870 if (
num2 > Main.maxTilesX)
2871 {
2872 num2 = Main.maxTilesX;
2873 }
2875 {
2877 }
2878 if (
num4 > Main.maxTilesY)
2879 {
2880 num4 = Main.maxTilesY;
2881 }
2883 for (
int i = num;
i <
num2;
i++)
2884 {
2886 {
2887 if (Main.tile[i,
j] ==
null || !Main.tile[i,
j].active() || Main.tile[
i,
j].inActive())
2888 {
2889 continue;
2890 }
2891 if (Main.tile[i,
j].type == 51)
2892 {
2897 {
2898 if (Main.tile[i,
j].type == 51 && (
double)(
Math.
Abs(Velocity.
X) +
Math.
Abs(Velocity.
Y)) > 0.7 && Main.rand.Next(30) == 0)
2899 {
2900 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 30);
2901 }
2903 }
2904 }
2905 else
2906 {
2907 if (Main.tile[i,
j].type != 229 || Main.tile[i,
j].slope() != 0)
2908 {
2909 continue;
2910 }
2914 float num7 = 16.01f;
2915 if (Main.tile[i,
j].halfBrick())
2916 {
2917 vector2.Y += 8f;
2919 }
2921 {
2922 if (Main.tile[i,
j].type == 51 && (
double)(
Math.
Abs(Velocity.
X) +
Math.
Abs(Velocity.
Y)) > 0.7 && Main.rand.Next(30) == 0)
2923 {
2924 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 30);
2925 }
2927 }
2928 }
2929 }
2930 }
2932 }
static double Abs(double value)
References System.Math.Abs(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Dust.NewDust(), Terraria.Main.rand, Terraria.Main.tile, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.
Referenced by Terraria.Player.StickyMovement().