Skip to content

Commit

Permalink
Log NetId assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 6, 2024
1 parent 4a4124a commit 5048f81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Fika.Core/Coop/Components/CoopHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,11 @@ private LocalPlayer SpawnObservedPlayer(Profile profile, Vector3 position, int p
return null;

((CoopPlayer)otherPlayer).NetId = netId;
Logger.LogInfo($"SpawnObservedPlayer: {profile.Nickname} spawning with NetId {netId}");
if (!isAI)
{
HumanPlayers++;
}

if (!Players.ContainsKey(netId))
{
Expand All @@ -507,7 +510,9 @@ private LocalPlayer SpawnObservedPlayer(Profile profile, Vector3 position, int p
foreach (CoopPlayer player in Players.Values)
{
if (player is not ObservedCoopPlayer)
{
continue;
}

Collider playerCollider = otherPlayer.GetCharacterControllerCommon().GetCollider();
Collider otherCollider = player.GetCharacterControllerCommon().GetCollider();
Expand Down

0 comments on commit 5048f81

Please sign in to comment.