NPC and Player split

This commit is contained in:
EntenKoeniq
2021-12-27 10:15:52 +01:00
parent 69cca124ff
commit c3b054c75a
13 changed files with 795 additions and 117 deletions

View File

@ -2,6 +2,8 @@
using System.ComponentModel;
using System.Linq;
using CoopClient.Entities.Player;
namespace CoopClient
{
/// <summary>
@ -134,7 +136,7 @@ namespace CoopClient
Dictionary<long, int?> result = new Dictionary<long, int?>();
lock (Main.Players)
{
foreach (KeyValuePair<long, Entities.EntitiesPlayer> player in Main.Players.Where(x => x.Key != Main.LocalNetHandle))
foreach (KeyValuePair<long, EntitiesPlayer> player in Main.Players.Where(x => x.Key != Main.LocalNetHandle))
{
result.Add(player.Key, player.Value.Character?.Handle);
}
@ -146,7 +148,7 @@ namespace CoopClient
/// Get a player using their Lidgren Network net handle
/// </summary>
/// <param name="handle">Lidgren-Network net handle</param>
public static Entities.EntitiesPlayer GetPlayer(long handle)
public static EntitiesPlayer GetPlayer(long handle)
{
lock (Main.Players)
{