Skip to content

Commit 24104f8

Browse files
authored
Use IsEntNetworkable
1 parent dc533d7 commit 24104f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/sourcemod/scripting/mitm/entity.sp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ methodmap Entity
5757
g_hEntityProperties = new ArrayList(sizeof(EntityProperties));
5858
}
5959

60-
int ref = IsValidEdict(entity) ? EntIndexToEntRef(entity) : entity;
60+
int ref = IsEntNetworkable(entity) ? EntIndexToEntRef(entity) : entity;
6161

6262
if (!Entity.IsReferenceTracked(ref))
6363
{
@@ -157,7 +157,7 @@ methodmap Entity
157157

158158
public static bool IsEntityTracked(int entity)
159159
{
160-
int ref = IsValidEdict(entity) ? EntIndexToEntRef(entity) : entity;
160+
int ref = IsEntNetworkable(entity) ? EntIndexToEntRef(entity) : entity;
161161
return Entity.IsReferenceTracked(ref);
162162
}
163163

0 commit comments

Comments
 (0)