mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 14:00:17 +00:00
add error check
This commit is contained in:
parent
1c389b2d91
commit
88580229d0
1 changed files with 2 additions and 0 deletions
|
@ -251,6 +251,8 @@ namespace SanAndreasUnity.Importing.Paths
|
|||
NumOfNodes = (int)reader.ReadUInt32();
|
||||
NumOfVehNodes = (int)reader.ReadUInt32();
|
||||
NumOfPedNodes = (int)reader.ReadUInt32();
|
||||
if (NumOfVehNodes + NumOfPedNodes != NumOfNodes)
|
||||
throw new Exception($"Node file {Id} has invalid number of nodes");
|
||||
NumOfNavNodes = (int)reader.ReadUInt32();
|
||||
NumOfLinks = (int)reader.ReadUInt32();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue