コード例 #1
0
        internal void ManualOLoop()
        {
            //Only allow forced entering of precum loop if currently in piston loop, to prevent issues with unintended o****m caused by entering precum loop elsewhere
            if (!forceOLoop && (flags.nowAnimStateName.Contains("SLoop") || flags.nowAnimStateName.Contains("WLoop") || flags.nowAnimStateName.Contains("MLoop")))
            {
                proc.SetPlay(flags.isAnalPlay ? "A_OLoop" : "OLoop", true);
                forceOLoop = true;
            }
            //Only allow exiting OLoop via keyboard shortcut if o****m has not been initiated,
            //by checking flags.finish in intercourse modes, or the "rePlay" field in service modes which would be at a non-zero value if o****m sequence has been initiated.
            else if (flags.nowAnimStateName.Contains("OLoop"))
            {
                bool notOrgasm = true;

                if (hCategory == HCategory.intercourse)
                {
                    notOrgasm = flags.finish == HFlag.FinishKind.none;
                }
                else if (hCategory == HCategory.service)
                {
                    notOrgasm = (Traverse.Create(proc).Field("rePlay")?.GetValue <int>() ?? 0) == 0;
                }

                if (notOrgasm)
                {
                    proc.SetPlay(flags.isAnalPlay ? "A_SLoop" : "SLoop", true);
                    forceOLoop = false;
                }
            }
        }
コード例 #2
0
        public static bool MotionChangeOverride(HActionBase __instance, ref bool __result)
        {
            if (motionChangeOld != null)
            {
                //If the animation was OLoop before the position change, set the current animation to SLoop, since beginning a new position in OLoop seems unnatural and requires a lot more work.
                __instance.SetPlay(motionChangeOld.Contains("OLoop") ? "SLoop" : motionChangeOld);

                __result = false;
                return(false);
            }
            return(true);
        }