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

◆ ItemCheck_TurretAltFeatureUse()

void Terraria.Player.ItemCheck_TurretAltFeatureUse ( Item sItem,
bool cShoot )
inlineprivate

Definition at line 50397 of file Player.cs.

50398 {
50399 if (sItem.shoot <= 0 || !ProjectileID.Sets.TurretFeature[sItem.shoot] || altFunctionUse != 2 || !cShoot || !ItemTimeIsZero)
50400 {
50401 return;
50402 }
50404 if (whoAmI != Main.myPlayer)
50405 {
50406 return;
50407 }
50408 for (int i = 0; i < 1000; i++)
50409 {
50410 Projectile projectile = Main.projectile[i];
50411 if (projectile.active && projectile.owner == Main.myPlayer && ProjectileID.Sets.TurretFeature[projectile.type])
50412 {
50413 projectile.Kill();
50414 }
50415 }
50416 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
static bool[] TurretFeature
If true for a given projectile type (F:Terraria.Projectile.type), then any item that shoots that proj...
bool ItemTimeIsZero
Definition Player.cs:4402
void ApplyItemTime(Item sItem, float multiplier=1f, bool? callUseItem=null)
Definition Player.cs:4907

References Terraria.Entity.active, Terraria.Player.altFunctionUse, Terraria.Player.ApplyItemTime(), Terraria.Player.ItemTimeIsZero, Terraria.Projectile.Kill(), Terraria.Main.myPlayer, Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.ID.ProjectileID.Sets.TurretFeature, Terraria.Projectile.type, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ItemCheck_OwnerOnlyCode().

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