//in Terraria.Projectile rename AI to VanillaAI then make AI call ProjectileLoader.ProjectileAI(this) internal static void ProjectileAI(Projectile projectile) { if (PreAI(projectile)) { int type = projectile.type; if (IsModProjectile(projectile) && projectile.modProjectile.aiType > 0) { projectile.type = projectile.modProjectile.aiType; } projectile.VanillaAI(); projectile.type = type; AI(projectile); } PostAI(projectile); }
//in Terraria.Projectile rename AI to VanillaAI then make AI call ProjectileLoader.ProjectileAI(this) public static void ProjectileAI(Projectile projectile) { if (PreAI(projectile)) { int type = projectile.type; bool useAiType = IsModProjectile(projectile) && projectile.modProjectile.aiType > 0; if (useAiType) { projectile.type = projectile.modProjectile.aiType; } projectile.VanillaAI(); if (useAiType) { projectile.type = type; } AI(projectile); } PostAI(projectile); }