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

◆ Volcano_TrySpawningVolcano()

void Terraria.Player.Volcano_TrySpawningVolcano ( NPC npc,
Item sItem,
float damage,
float knockBack,
Rectangle itemRectangle )
inlineprivate

Definition at line 41966 of file Player.cs.

41967 {
41968 if (_spawnVolcanoExplosion && Main.myPlayer == whoAmI && (npc == null || npc.HittableForOnHitRewards()))
41969 {
41970 Vector2 center = npc.Center;
41971 int num = 2;
41972 Projectile.NewProjectile(GetProjectileSource_Item(sItem), center.X, center.Y, 0f, -1f * gravDir, 978, (int)damage, knockBack, whoAmI, 0f, num);
41973 _spawnVolcanoExplosion = false;
41974 }
41975 }
IEntitySource GetProjectileSource_Item(Item item)
Definition Player.cs:9272
bool _spawnVolcanoExplosion
Definition Player.cs:2455

References Terraria.Entity.Center, Terraria.NPC.HittableForOnHitRewards(), Terraria.Main.myPlayer, and Terraria.Projectile.NewProjectile().