コード例 #1
0
ファイル: IngressPoint.cs プロジェクト: FLSoz/NoBlockDetach
            public static bool Prefix(ref BlockManager __instance, ref bool allowHeadlessTech, ref bool removeTechIfEmpty)
            {
                Tank tank = (Tank)IngressPoint.tank.GetValue(__instance);

                IngressPoint.FixupBlockRefs(__instance);
                if (!allowHeadlessTech && !tank.control.HasController && !tank.IsAnchored)
                {
                    IngressPoint.HostRemoveAllBlocks(__instance, BlockManager.RemoveAllAction.ApplyPhysicsKick);
                }
                if (__instance.blockCount == 0)
                {
                    d.Assert(tank.blockman.blockCount == 0);
                    tank.EnableGravity = false;
                }
                return(false);
            }