internal static void OnAI(Projectile pr) { var bh = pr.P_BHandler as ProjBHandler; if (bh == null || bh.PreAI()) { pr.RealAI(); if (bh != null) bh.OnAI(); } }