Skip to content

Commit

Permalink
fix(server): fix passenger list by entering on vehicle
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Sep 8, 2024
1 parent fb66dc2 commit 70e2b3e
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions api/AltV.Net/Core.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -724,24 +724,6 @@ public void OnPlayerEnteringVehicle(IntPtr vehiclePointer, IntPtr playerPointer,
return;
}

if (VehiclePassengers.TryGetValue(vehiclePointer, out var passengers))
{
if (passengers.Exists(x => x.PlayerPointer == playerPointer))
{
var playerSeat = passengers.First(x => x.PlayerPointer == playerPointer);
playerSeat.Seat = seat;
}
else
{
passengers.Add(new InternalPlayerSeat { PlayerPointer = playerPointer, Seat = seat });
}
}
else
{
VehiclePassengers[vehiclePointer] = new List<InternalPlayerSeat>
{ new() { PlayerPointer = playerPointer, Seat = seat } };
}

OnPlayerEnteringVehicleEvent(vehicle, player, seat);
}

Expand Down

0 comments on commit 70e2b3e

Please sign in to comment.