internal static void OnUpdate(Player p, int id) { var bh = p.P_BHandler as PlayerBHandler; var oldId = p.whoAmI; p.whoAmI = id; if (bh != null) bh.PreUpdate(); p.whoAmI = oldId; p.RealUpdate(id); if (bh != null) bh.PostUpdate(); }