added compile-time support for up to 64 maxplayers
This commit is contained in:
parent
1259276bcb
commit
5ff6b9ecde
8 changed files with 28 additions and 13 deletions
|
|
@ -1052,7 +1052,7 @@ void Waypoint::InitTypes (void)
|
|||
|
||||
bool Waypoint::Load (void)
|
||||
{
|
||||
MemoryFile fp (CheckSubfolderFile ());
|
||||
File fp (CheckSubfolderFile (), "rb");
|
||||
|
||||
WaypointHeader header;
|
||||
memset (&header, 0, sizeof (header));
|
||||
|
|
@ -1118,6 +1118,16 @@ bool Waypoint::Load (void)
|
|||
fp.Close ();
|
||||
return false;
|
||||
}
|
||||
|
||||
// more checks of waypoint quality
|
||||
if (m_paths[i]->pathNumber < 0 || m_paths[i]->pathNumber > g_numWaypoints)
|
||||
{
|
||||
sprintf (m_infoBuffer, "%s.pwf - bad waypoint file (path #%d index is out of bounds)", map, i);
|
||||
AddLogEntry (true, LL_ERROR, m_infoBuffer);
|
||||
|
||||
fp.Close ();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
m_waypointPaths = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue