Skip to content

Commit

Permalink
fix(server): clear data only if its not cached
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Feb 17, 2024
1 parent 5744452 commit 08f8bd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/AltV.Net/Elements/Pools/BaseObjectPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ public static void SetEntityNoLongerExists(TBaseObject entity)
{
if (entity is not IInternalBaseObject internalEntity) return;
internalEntity.Exists = false;
internalEntity.ClearData();
if (!entity.Cached)
{
internalEntity.ClearData();
}
}

private readonly Dictionary<IntPtr, TBaseObject> entities = new ();
Expand Down

0 comments on commit 08f8bd4

Please sign in to comment.