示例#1
0
        protected override void ReadData(DataBuffer buf, FileFormat fmt)
        {
            PlayerPeds.Clear();

            int numPeds = buf.ReadInt32();

            for (int i = 0; i < numPeds; i++)
            {
                PedTypeId type   = (PedTypeId)buf.ReadInt32();
                short     model  = buf.ReadInt16();
                int       handle = buf.ReadInt32();
                PlayerPed p      = new PlayerPed(model, handle)
                {
                    Type = type
                };
                Serializer.Read(p, buf, fmt);
                p.MaxWantedLevel = buf.ReadInt32();
                p.MaxChaosLevel  = buf.ReadInt32();
                p.ModelName      = buf.ReadString(PlayerPed.MaxModelNameLength);
                if (fmt.IsMobile)
                {
                    buf.Skip(4);
                }
                PlayerPeds.Add(p);
            }

            Debug.Assert(buf.Offset == SizeOfObject(this, fmt));
        }
示例#2
0
        public bool Equals(SaveFileGTA3 other)
        {
            if (other == null)
            {
                return(false);
            }

            return(SimpleVars.Equals(other.SimpleVars) &&
                   Scripts.Equals(other.Scripts) &&
                   PlayerPeds.Equals(other.PlayerPeds) &&
                   Garages.Equals(other.Garages) &&
                   Vehicles.Equals(other.Vehicles) &&
                   Objects.Equals(other.Objects) &&
                   Paths.Equals(other.Paths) &&
                   Cranes.Equals(other.Cranes) &&
                   Pickups.Equals(other.Pickups) &&
                   PhoneInfo.Equals(other.PhoneInfo) &&
                   RestartPoints.Equals(other.RestartPoints) &&
                   RadarBlips.Equals(other.RadarBlips) &&
                   Zones.Equals(other.Zones) &&
                   Gangs.Equals(other.Gangs) &&
                   CarGenerators.Equals(other.CarGenerators) &&
                   ParticleObjects.Equals(other.ParticleObjects) &&
                   AudioScriptObjects.Equals(other.AudioScriptObjects) &&
                   PlayerInfo.Equals(other.PlayerInfo) &&
                   Stats.Equals(other.Stats) &&
                   Streaming.Equals(other.Streaming) &&
                   PedTypeInfo.Equals(other.PedTypeInfo));
        }
示例#3
0
        public bool Equals(PedPool other)
        {
            if (other == null)
            {
                return(false);
            }

            return(PlayerPeds.SequenceEqual(other.PlayerPeds));
        }
示例#4
0
 public IEnumerator <PlayerPed> GetEnumerator()
 {
     return(PlayerPeds.GetEnumerator());
 }