Fixed exceptions in NetEntityEvent.IsDuplicate if the data array contains null

This commit is contained in:
Joonas Rikkonen
2017-07-26 20:18:35 +03:00
parent c63248ee51
commit 520e1df1a5
@@ -42,8 +42,13 @@ namespace Barotrauma.Networking
{
if (Data.Length == other.Data.Length)
{
for (int i = 0; i<Data.Length; i++)
for (int i = 0; i < Data.Length; i++)
{
if (Data[i] == null)
{
if (other.Data[i] != null) return false;
}
if (!Data[i].Equals(other.Data[i])) return false;
}
return true;