4217 {
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4230 if (velocity.X < 0
f)
4231 {
4233 }
4234 if (velocity.X > 0
f)
4235 {
4237 }
4238 Vector2
vector = position;
4239 vector.X += velocity.X;
4240 int num2 = (int)((
vector.X + (
float)(width / 2) + (
float)((width / 2 + 1) *
num)) / 16
f);
4241 int num3 = (int)(((
double)vector.Y + 0.1) / 16.0);
4242 if (gravDir == 1)
4243 {
4245 }
4246 int num4 = height / 16 + ((height % 16 != 0) ? 1 : 0);
4250 {
4251 return;
4252 }
4253 for (
int i = 1; i <
num4 + 2; i++)
4254 {
4256 {
4257 return;
4258 }
4259 }
4261 {
4262 return;
4263 }
4265 for (
int j = 2;
j <
num4 + 1;
j++)
4266 {
4268 {
4269 return;
4270 }
4271 tile = Main.tile[
num2,
num3 -
j * gravDir];
4272 flag =
flag && (!tile.nactive() || !Main.tileSolid[tile.type] || Main.tileSolidTop[tile.type]);
4273 }
4275 flag2 =
flag2 && (!tile.nactive() || !Main.tileSolid[tile.type] || Main.tileSolidTop[tile.type]);
4280 if (gravDir == 1)
4281 {
4282 if (Main.tile[
num2,
num3 - gravDir] ==
null || Main.tile[
num2,
num3 - (
num4 + 1) * gravDir] ==
null)
4283 {
4284 return;
4285 }
4286 tile = Main.tile[
num2,
num3 - gravDir];
4288 flag3 =
flag3 && (!tile.nactive() || !Main.tileSolid[tile.type] || Main.tileSolidTop[tile.type] || (tile.slope() == 1 && position.X + (float)(width / 2) > (float)(
num2 * 16)) || (tile.slope() == 2 && position.X + (float)(width / 2) < (float)(
num2 * 16 + 16)) || (tile.halfBrick() && (!
tile2.nactive() || !Main.tileSolid[
tile2.type] || Main.tileSolidTop[
tile2.type])));
4292 {
4294 }
4295 flag4 =
flag4 && ((tile.nactive() && (!tile.topSlope() || (tile.slope() == 1 && position.X + (float)(width / 2) < (float)(
num2 * 16)) || (tile.slope() == 2 && position.X + (float)(width / 2) > (float)(
num2 * 16 + 16))) && (!tile.topSlope() || position.Y + (float)height > (
float)(
num3 * 16)) && ((Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type]) || (
holdsMatching && ((Main.tileSolidTop[tile.type] && tile.frameY == 0) ||
TileID.
Sets.
Platforms[tile.type]) && (!Main.tileSolid[
tile2.type] || !
tile2.nactive()) &&
flag5))) || (
tile2.halfBrick() &&
tile2.nactive()));
4296 flag4 &= !Main.tileSolidTop[tile.type] || !Main.tileSolidTop[
tile2.type];
4297 }
4298 else
4299 {
4300 tile = Main.tile[
num2,
num3 - gravDir];
4302 flag3 =
flag3 && (!tile.nactive() || !Main.tileSolid[tile.type] || Main.tileSolidTop[tile.type] || tile.slope() != 0 || (tile.halfBrick() && (!
tile2.nactive() || !Main.tileSolid[
tile2.type] || Main.tileSolidTop[
tile2.type])));
4305 flag4 =
flag4 && ((tile.nactive() && ((Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type]) || (
holdsMatching && Main.tileSolidTop[tile.type] && tile.frameY == 0 && (!Main.tileSolid[
tile2.type] || !
tile2.nactive())))) || (
tile2.halfBrick() &&
tile2.nactive()));
4306 }
4308 {
4309 return;
4310 }
4311 if (gravDir == 1)
4312 {
4314 {
4315 return;
4316 }
4318 if (Main.tile[
num2,
num3 - 1].halfBrick())
4319 {
4321 }
4322 else if (Main.tile[
num2,
num3].halfBrick())
4323 {
4325 }
4327 {
4328 return;
4329 }
4330 float num6 = vector.Y + (float)height -
num5;
4331 if ((
double)
num6 <= 16.1)
4332 {
4333 gfxOffY += position.Y + (float)height -
num5;
4334 position.Y =
num5 - (float)height;
4336 {
4338 }
4339 else
4340 {
4342 }
4343 }
4344 }
4345 else
4346 {
4348 {
4349 return;
4350 }
4353 {
4354 return;
4355 }
4357 if ((
double)
num8 <= 16.1)
4358 {
4359 gfxOffY -=
num7 - position.Y;
4363 {
4365 }
4366 else
4367 {
4369 }
4370 }
4371 }
4372 }
static bool[] IgnoredByNpcStepUp
Whether or not the tile will be ignored for automatic step up regarding town NPC collision....