Ejemplo n.º 1
0
        internal void Reset()
        {
#if DEBUG
            bool citDebug = (GlobalConfig.Instance.Debug.CitizenInstanceId == 0 || GlobalConfig.Instance.Debug.CitizenInstanceId == instanceId) &&
                            (GlobalConfig.Instance.Debug.CitizenId == 0 || GlobalConfig.Instance.Debug.CitizenId == GetCitizenId()) &&
                            (GlobalConfig.Instance.Debug.SourceBuildingId == 0 || GlobalConfig.Instance.Debug.SourceBuildingId == Singleton <CitizenManager> .instance.m_instances.m_buffer[instanceId].m_sourceBuilding) &&
                            (GlobalConfig.Instance.Debug.TargetBuildingId == 0 || GlobalConfig.Instance.Debug.TargetBuildingId == Singleton <CitizenManager> .instance.m_instances.m_buffer[instanceId].m_targetBuilding)
            ;
            bool debug     = GlobalConfig.Instance.Debug.Switches[2] && citDebug;
            bool fineDebug = GlobalConfig.Instance.Debug.Switches[4] && citDebug;

            if (fineDebug)
            {
                Log.Warning($"ExtCitizenInstance.Reset({instanceId}): Resetting ext. citizen instance {instanceId}");
            }
#endif
            //Flags = ExtFlags.None;
            pathMode = ExtPathMode.None;
            failedParkingAttempts   = 0;
            parkingSpaceLocation    = ExtParkingSpaceLocation.None;
            parkingSpaceLocationId  = 0;
            lastDistanceToParkedCar = float.MaxValue;
            atOutsideConnection     = false;
            //ParkedVehiclePosition = default(Vector3);
            ReleaseReturnPath();
        }
 internal ExtCitizenInstance(ushort instanceId)
 {
     this.instanceId          = instanceId;
     pathMode                 = ExtPathMode.None;
     failedParkingAttempts    = 0;
     parkingSpaceLocationId   = 0;
     parkingSpaceLocation     = ExtParkingSpaceLocation.None;
     parkingPathStartPosition = null;
     returnPathId             = 0;
     returnPathState          = ExtPathState.None;
     lastDistanceToParkedCar  = 0;
 }
        internal void Reset(bool debugLog = true)
        {
#if DEBUG
            if (debugLog && GlobalConfig.Instance.Debug.Switches[4])
            {
                Log.Warning($"ExtCitizenInstance.Reset({instanceId}): Resetting ext. citizen instance {instanceId}");
            }
#endif
            //Flags = ExtFlags.None;
            pathMode = ExtPathMode.None;
            failedParkingAttempts   = 0;
            parkingSpaceLocation    = ExtParkingSpaceLocation.None;
            parkingSpaceLocationId  = 0;
            lastDistanceToParkedCar = float.MaxValue;
            //ParkedVehiclePosition = default(Vector3);
            ReleaseReturnPath();
        }