Bus and Pilot Overhaul
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user