NetEntityEvent.IsDuplicate null reference fix for real now

This commit is contained in:
Joonas Rikkonen
2017-07-28 19:34:01 +03:00
parent 9e3f4bfa5a
commit f58566b0d5

View File

@@ -40,23 +40,21 @@ namespace Barotrauma.Networking
if (Data != null && other.Data != null)
{
if (Data.Length == other.Data.Length)
if (Data.Length != other.Data.Length) return false;
for (int i = 0; i < Data.Length; i++)
{
for (int i = 0; i < Data.Length; i++)
if (Data[i] == null)
{
if (Data[i] == null)
{
if (other.Data[i] != null) return false;
}
if (other.Data[i] != null) return false;
}
else
{
if (other.Data[i] == null) return false;
if (!Data[i].Equals(other.Data[i])) return false;
}
return true;
}
else
{
return false;
}
return true;
}
return Data == other.Data;