Fix player dying when switching characters
This commit is contained in:
@ -363,7 +363,7 @@ namespace RageCoop.Client
|
|||||||
foreach (Ped p in allPeds)
|
foreach (Ped p in allPeds)
|
||||||
{
|
{
|
||||||
SyncedPed c = GetPedByHandle(p.Handle);
|
SyncedPed c = GetPedByHandle(p.Handle);
|
||||||
if (c == null && (p != Game.Player.Character))
|
if (c == null && (p != Game.Player.Character) && !Function.Call<bool>(Hash.IS_PLAYER_SWITCH_IN_PROGRESS))
|
||||||
{
|
{
|
||||||
if (allPeds.Length > Main.Settings.WorldPedSoftLimit && p.PopulationType == EntityPopulationType.RandomAmbient && !p.IsInVehicle())
|
if (allPeds.Length > Main.Settings.WorldPedSoftLimit && p.PopulationType == EntityPopulationType.RandomAmbient && !p.IsInVehicle())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user