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

◆ UpdatePosition()

void Terraria.Projectile.UpdatePosition ( Vector2 wetVelocity)
inlineprivate

Definition at line 17055 of file Projectile.cs.

17056 {
17057 if (aiStyle == 4 || aiStyle == 38 || aiStyle == 84 || aiStyle == 148 || (aiStyle == 7 && ai[0] == 2f) || ((type == 440 || type == 449 || type == 606) && ai[1] == 1f) || (aiStyle == 93 && ai[0] < 0f) || type == 540 || type == 756 || type == 818 || type == 856 || type == 961 || type == 933 || ProjectileID.Sets.IsAGolfBall[type])
17058 {
17059 return;
17060 }
17061 if (wet)
17062 {
17064 }
17065 else
17066 {
17067 position += velocity;
17068 }
17069 if (Main.projPet[type] && tileCollide)
17070 {
17071 bool fall = false;
17072 if (aiStyle == 62)
17073 {
17074 fall = true;
17075 }
17076 switch (type)
17077 {
17078 case 317:
17079 case 387:
17080 case 388:
17081 case 533:
17082 case 759:
17083 fall = true;
17084 break;
17085 }
17086 Vector4 vector = Collision.SlopeCollision(position, velocity, width, height, 0f, fall);
17087 position.X = vector.X;
17088 position.Y = vector.Y;
17089 velocity.X = vector.Z;
17090 velocity.Y = vector.W;
17091 }
17092 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14

References Terraria.Projectile.ai, Terraria.Projectile.aiStyle, Terraria.Entity.height, Terraria.ID.ProjectileID.Sets.IsAGolfBall, Terraria.Entity.position, Terraria.Main.projPet, Terraria.Collision.SlopeCollision(), Terraria.Projectile.tileCollide, Terraria.Projectile.type, Terraria.Entity.velocity, Terraria.Entity.wet, and Terraria.Entity.width.

Referenced by Terraria.Projectile.HandleMovement().