Definition at line 1475 of file Collision.cs.
1476 {
1477 if (Velocity.
Y != gravity)
1478 {
1480 }
1485 value = Utils.Clamp(
value, 0, Main.maxTilesX - 1);
1488 float num = (
value3 + 3) * 16;
1492 if (Velocity.
X < 0f)
1493 {
1495 }
1497 {
1499 {
1500 if (Main.tile[i,
j] ==
null)
1501 {
1502 Main.tile[
i,
j] =
new Tile();
1503 }
1504 if (!Main.tile[i,
j].nactive() || (!Main.tileSolid[Main.tile[i,
j].type] && !Main.tileSolidTop[Main.tile[i,
j].type]))
1505 {
1506 continue;
1507 }
1509 if (Main.tile[i,
j].halfBrick())
1510 {
1512 }
1514 {
1515 continue;
1516 }
1517 if (num == (
float)
num5)
1518 {
1519 if (Main.tile[i,
j].slope() == 0)
1520 {
1521 continue;
1522 }
1524 {
1525 if (Main.tile[i,
j].slope() ==
num4)
1526 {
1530 }
1531 }
1532 else
1533 {
1537 }
1538 }
1539 else
1540 {
1544 }
1545 }
1546 }
1550 {
1553 vector2.X =
num6 * 16;
1554 vector2.Y =
num7 * 16;
1556 {
1557 case 2:
1558 {
1559 float num9 = vector2.X + 16f - (Position.X + (float)Width);
1561 {
1562 Velocity.Y +=
Math.
Abs(Velocity.
X);
1563 }
1564 break;
1565 }
1566 case 1:
1567 {
1570 {
1571 Velocity.Y +=
Math.
Abs(Velocity.
X);
1572 }
1573 break;
1574 }
1575 }
1576 }
1578 }
static double Abs(double value)
References System.Math.Abs(), Microsoft.Xna.Framework.Intersects, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.DataStructures.Tile, Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, System.value, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.
Referenced by Terraria.NPC.Collision_WalkDownSlopes(), and Terraria.Player.SlopeDownMovement().