33 lines
778 B
C#
33 lines
778 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using GTANetworkAPI;
|
|
|
|
namespace ReallifeGamemode.Server.Extensions
|
|
{
|
|
internal static class ListExtensions
|
|
{
|
|
public static bool VectorEquals(this List<Vector3> vector3s, List<Vector3> compareToList)
|
|
{
|
|
if (compareToList is null || vector3s is null)
|
|
return false;
|
|
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;
|
|
}
|
|
}
|
|
}
|