Пример #1
0
        public override void OnInteractionQueueEmpty()
        {
            if (IsOpenDGSInstalled)
            {
                r_internal(_Actor);
                base.OnInteractionQueueEmpty();
                return;
            }

            NFinalizeDeath.CheckACoreThrowNRaasErrorTrap();

            if (NiecHelperSituation.__acorewIsnstalled__ && !NiecHelperSituation.isdgmods)
            {
                var t = Assembly.GetCallingAssembly()._mono_assembly == Instantiator.myAssemblyPtr;
                if (_Actor != null && _Actor.mSimDescription != null && NFinalizeDeath.SimIsGRReaper(_Actor.mSimDescription))
                {
                    NiecRunCommand.fcreap_Icommand(_Actor, true, false);
                }
                while (_Actor != null)
                {
                    try
                    {
                        NFinalizeDeath.CheckYieldingContext();
                    }
                    catch (ResetException)
                    {
                        if (!t)
                        {
                            NFinalizeDeath.SafeForceTerminateRuntime();
                        }
                        throw;
                    }

                    Simulator.Sleep(0);

                    try
                    {
                        r_internal(_Actor);
                        break;
                    }
                    catch (ResetException)
                    {
                        if (_Actor != null && NFinalizeDeath.GameObjectIsValid(_Actor.ObjectId.mValue))
                        {
                            ExistsOrCreatePosture(_Actor, NeedMaxMood);
                        }
                        if (!t)
                        {
                            NFinalizeDeath.SafeForceTerminateRuntime();
                        }
                        throw;
                    }
                    catch (Exception)
                    {
                        try
                        {
                            NFinalizeDeath.CheckYieldingContext();
                        }
                        catch (ResetException)
                        {
                            if (_Actor != null && NFinalizeDeath.GameObjectIsValid(_Actor.ObjectId.mValue))
                            {
                                ExistsOrCreatePosture(_Actor, NeedMaxMood);
                            }
                            if (!t)
                            {
                                NFinalizeDeath.SafeForceTerminateRuntime();
                            }
                            throw;
                        }
                    }
                }
            }
            else
            {
                r_internal(_Actor);
            }
            base.OnInteractionQueueEmpty();
        }