Skip to content

Commit

Permalink
remove null check for netowner change
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Jun 18, 2023
1 parent 2a9ddc8 commit 5a46319
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions api/AltV.Net/Core.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -979,11 +979,6 @@ public virtual void OnPlayerWeaponChangeEvent(IntPtr eventPointer, IPlayer playe
public void OnNetOwnerChange(IntPtr eventPointer, IntPtr targetEntityPointer, BaseObjectType targetEntityType, IntPtr oldNetOwnerPointer, IntPtr newNetOwnerPointer)
{
var targetEntity = (IEntity)PoolManager.Get(targetEntityPointer, targetEntityType);
if (targetEntity is null)
{
Console.WriteLine("OnNetOwnerChange Invalid targetEntity " + targetEntity);
return;
}

var oldPlayer = PoolManager.Player.Get(oldNetOwnerPointer);
var newPlayer = PoolManager.Player.Get(newNetOwnerPointer);
Expand Down

0 comments on commit 5a46319

Please sign in to comment.