Bus and Pilot Overhaul

This commit is contained in:
2021-04-10 23:23:46 +02:00
parent 62b3f7ced9
commit 167859817e
5 changed files with 134 additions and 221 deletions

View File

@@ -6,9 +6,25 @@ namespace ReallifeGamemode.Server.Extensions
{
internal static class ListExtensions
{
public static bool Contains(this List<Player> list, Player client)
public static bool VectorEquals(this List<Vector3> vector3s, List<Vector3> compareToList)
{
return list.Any(l => l.Handle.Value == client.Handle.Value);
if (vector3s.Count != compareToList.Count)
return false;
for (int i = 0; i < vector3s.Count; i++)
{
Vector3 vector = vector3s[i];
Vector3 compareTo = compareToList[i];
if (vector.X != compareTo.X)
return false;
if (vector.Y != compareTo.Y)
return false;
if (vector.Z != compareTo.Z)
return false;
}
return true;
}
}
}