46143 {
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46162 {
46163 Vector2
val = Main.player[
owner].Center -
base.Center;
46165 }
46167 {
46169 return;
46170 }
46171 Main.player[
owner].SetDummyItemTime(10);
46173 {
46174 Main.player[
owner].ChangeDir(1);
46176 }
46177 else
46178 {
46179 Main.player[
owner].ChangeDir(-1);
46181 }
46183 Vector2
vector =
default(Vector2);
46185 float num = mountedCenter.X -
vector.X;
46189 {
46192 {
46194 }
46196 {
46198 }
46200 {
46202 }
46205 {
46208 }
46209 else if (!Main.player[
owner].channel)
46210 {
46212 {
46213 velocity.Y *= 0.9f;
46214 }
46216 velocity.X *= 0.9f;
46217 }
46218 }
46219 else if (
ai[0] == 1
f)
46220 {
46221 float meleeSpeed = Main.player[
owner].inverseMeleeSpeed;
46222 float num13 = 14
f / meleeSpeed;
46223 float num14 = 0.9f / meleeSpeed;
46224 float num15 = 300
f / meleeSpeed;
46227 {
46231 }
46233 {
46238 }
46240 {
46245 }
46249 {
46251 }
46253 {
46256 {
46258 }
46261 {
46263 }
46264 }
46266 {
46268 }
46270 {
46281 velocity.X *= 0.98f;
46282 velocity.Y *= 0.98f;
46283 velocity.X +=
num17;
46284 velocity.Y +=
num2;
46285 }
46286 else
46287 {
46289 {
46290 velocity.X *= 0.96f;
46291 velocity.Y += 0.2f;
46292 }
46293 if (Main.player[
owner].velocity.X == 0
f)
46294 {
46295 velocity.X *= 0.96f;
46296 }
46297 }
46298 }
46300 {
46302 {
46304 }
46305 else
46306 {
46308 }
46312 bool flag2 =
false;
46313 if (
owner == Main.myPlayer)
46314 {
46317 {
46319 for (int i = 0; i < 200; i++)
46320 {
46321 if (Main.npc[i].CanBeChasedBy(this))
46322 {
46323 float num7 = Main.npc[i].position.X + (float)(Main.npc[i].width / 2);
46324 float num8 = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2);
46327 {
46332 }
46333 }
46334 }
46335 }
46336 }
46338 {
46348 }
46349 }
46350 else
46351 {
46353 }
46354 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
void AI_015_Flails_Dust(bool doFastThrowDust)
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...