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

◆ FindHelperFromGolfBall()

static Projectile Terraria.GameContent.Golf.GolfHelper.FindHelperFromGolfBall ( Projectile golfBall)
inlinestatic

Definition at line 390 of file GolfHelper.cs.

391 {
392 for (int i = 0; i < 1000; i++)
393 {
394 Projectile projectile = Main.projectile[i];
395 if (projectile.active && projectile.type == 722 && projectile.owner == golfBall.owner)
396 {
397 return Main.projectile[i];
398 }
399 }
400 return null;
401 }

References Terraria.Entity.active, Terraria.Projectile.owner, Terraria.Main.projectile, and Terraria.Projectile.type.