Don't delete peds in vehicle

This commit is contained in:
oldnapalm
2023-07-14 09:39:06 -03:00
parent 6136cbfc14
commit de96f29097

View File

@ -365,7 +365,7 @@ namespace RageCoop.Client
SyncedPed c = GetPedByHandle(p.Handle);
if (c == null && (p != Game.Player.Character))
{
if (allPeds.Length > Main.Settings.WorldPedSoftLimit && p.PopulationType == EntityPopulationType.RandomAmbient)
if (allPeds.Length > Main.Settings.WorldPedSoftLimit && p.PopulationType == EntityPopulationType.RandomAmbient && !p.IsInVehicle())
{
p.Delete();
continue;