Disambiguate ObjectId to GameObjectId and EntityId

This commit is contained in:
Kaz Wolfe 2024-06-03 11:19:39 -07:00
parent 61f47449fd
commit 8d5f2bdf51
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4
6 changed files with 23 additions and 18 deletions

View file

@ -83,16 +83,16 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable
}
/// <inheritdoc/>
public GameObject? SearchById(ulong objectId)
public GameObject? SearchById(ulong gameObjectId)
{
_ = this.WarnMultithreadedUsage();
if (objectId is GameObject.InvalidGameObjectId or 0)
if (gameObjectId is 0)
return null;
foreach (var e in this.cachedObjectTable)
{
if (e.Update() is { } o && o.ObjectId == objectId)
if (e.Update() is { } o && o.GameObjectId == gameObjectId)
return o;
}