Ejemplo n.º 1
0
            public override bool Run()
            {
                try
                {
                    Actor.UnrequestWalkStyle(Sim.WalkStyle.ForceRun);
                    Definition             interactionDefinition = base.InteractionDefinition as Definition;
                    ArrestSuspectSituation arrestSituation       = interactionDefinition.ArrestSituation;
                    CarService             copCar = arrestSituation.CopCar;
                    Sim simToArrest = arrestSituation.SimToArrest;
                    if (base.Actor == simToArrest)
                    {
                        copCar.RouteToAndGetIn(simToArrest, false);
                        //simToArrest.FlagSet(Sim.SimFlags.IgnoreDoorLocks, true);
                        InteractionInstance instance = PoliceSituation.Wait.Singleton.CreateInstance(simToArrest, simToArrest, new InteractionPriority((InteractionPriorityLevel)99), false, false);
                        simToArrest.InteractionQueue.PushAsContinuation(instance, true);
                    }
                    else
                    {
                        copCar.RouteToAndGetIn(arrestSituation.Cop, true);
                        while (!(arrestSituation.SimToArrest.mPosture is SittingInVehicle))
                        {
                            Simulator.Sleep(30u);
                        }
                        CarNpcManager.Singleton.DriveToLotInCar(copCar, arrestSituation.Cop, arrestSituation.Station.LotCurrent, false);
                    }
                }
                catch (ResetException)
                { throw; }
                catch (System.Exception)
                { }

                return(true);
            }
            public override bool Run()
            {
                Definition             interactionDefinition = base.InteractionDefinition as Definition;
                ArrestSuspectSituation arrestSituation       = interactionDefinition.ArrestSituation;
                CarService             copCar = arrestSituation.CopCar;
                Sim simToArrest = arrestSituation.SimToArrest;

                if (base.Actor == simToArrest)
                {
                    copCar.RouteToAndGetIn(simToArrest, false);
                    //simToArrest.FlagSet(Sim.SimFlags.IgnoreDoorLocks, true);
                    InteractionInstance instance = PoliceSituation.Wait.Singleton.CreateInstance(simToArrest, simToArrest, new InteractionPriority((InteractionPriorityLevel)99), false, false);
                    simToArrest.InteractionQueue.PushAsContinuation(instance, true);
                }
                else
                {
                    copCar.RouteToAndGetIn(arrestSituation.Cop, true);
                    CarNpcManager.Singleton.DriveToLotInCar(copCar, arrestSituation.Cop, arrestSituation.Station.LotCurrent, false);
                }
                return(true);
            }
Ejemplo n.º 3
0
 public Definition(ArrestSuspectSituation situation)
 {
     this.arrestSituation = situation;
 }