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)); }
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)); }
public bool Equals(PedPool other) { if (other == null) { return(false); } return(PlayerPeds.SequenceEqual(other.PlayerPeds)); }
public IEnumerator <PlayerPed> GetEnumerator() { return(PlayerPeds.GetEnumerator()); }