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

◆ Damage_GetHitbox()

Rectangle Terraria.Projectile.Damage_GetHitbox ( )
inlineprivate

Definition at line 13781 of file Projectile.cs.

13782 {
13783 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
13784 Rectangle result = default(Rectangle);
13785 ((Rectangle)(ref result))._002Ector((int)position.X, (int)position.Y, width, height);
13786 if (type == 101)
13787 {
13788 ((Rectangle)(ref result)).Inflate(30, 30);
13789 }
13790 if (type == 85)
13791 {
13792 int num = (int)Utils.Remap(localAI[0], 0f, 72f, 10f, 40f);
13793 ((Rectangle)(ref result)).Inflate(num, num);
13794 }
13795 if (type == 188)
13796 {
13797 ((Rectangle)(ref result)).Inflate(20, 20);
13798 }
13799 if (aiStyle == 29)
13800 {
13801 ((Rectangle)(ref result)).Inflate(4, 4);
13802 }
13803 if (type == 967)
13804 {
13805 ((Rectangle)(ref result)).Inflate(10, 10);
13806 }
13808 return result;
13809 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static void ModifyDamageHitbox(Projectile projectile, ref Rectangle hitbox)
This serves as the central class from which projectile-related functions are carried out....
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla projectile AI styles are enumerated in t...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...

References Terraria.Projectile.aiStyle, Terraria.Entity.height, Terraria.Projectile.localAI, Terraria.ModLoader.ProjectileLoader.ModifyDamageHitbox(), Terraria.Entity.position, Terraria.Utils.Remap(), Terraria.Projectile.type, and Terraria.Entity.width.

Referenced by Terraria.Projectile.Damage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: