Skip to content

Commit

Permalink
Fix issue with entity objects being null
Browse files Browse the repository at this point in the history
  • Loading branch information
Extremelyd1 committed Jul 19, 2024
1 parent f31617d commit e8e5aee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HKMP/Game/Client/Entity/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,11 @@ private void OnUpdate() {
if (_lastIsActive) {
// If the host object was active, but now it null (or destroyed in Unity), we can send
// to the server that the entity can be regarded as inactive
Logger.Info($"Entity '{Object.Client.name}' host object is null (or destroyed) and was active");
if (Object.Client == null) {
Logger.Info($"Entity ({Id}, {Type}) host and client object is null (or destroyed) and was active");
} else {
Logger.Info($"Entity '{Object.Client.name}' host object is null (or destroyed) and was active");
}

_lastIsActive = false;

Expand Down

0 comments on commit e8e5aee

Please sign in to comment.