mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
Write Links only when mLinkIDs.size() > 0
This commit is contained in:
parent
ab68a19a8b
commit
800b7d1fd4
1 changed files with 9 additions and 6 deletions
|
|
@ -1670,12 +1670,15 @@ bool NavMesh::save()
|
||||||
|
|
||||||
S32 s = mLinkIDs.size();
|
S32 s = mLinkIDs.size();
|
||||||
file.write(sizeof(S32), (const char*)&s);
|
file.write(sizeof(S32), (const char*)&s);
|
||||||
file.write(sizeof(F32) * s * 6, (const char*)mLinkVerts.address());
|
if (s > 0)
|
||||||
file.write(sizeof(F32) * s, (const char*)mLinkRads.address());
|
{
|
||||||
file.write(sizeof(U8) * s, (const char*)mLinkDirs.address());
|
file.write(sizeof(F32) * s * 6, (const char*)mLinkVerts.address());
|
||||||
file.write(sizeof(U8) * s, (const char*)mLinkAreas.address());
|
file.write(sizeof(F32) * s, (const char*)mLinkRads.address());
|
||||||
file.write(sizeof(U16) * s, (const char*)mLinkFlags.address());
|
file.write(sizeof(U8) * s, (const char*)mLinkDirs.address());
|
||||||
file.write(sizeof(U32) * s, (const char*)mLinkIDs.address());
|
file.write(sizeof(U8) * s, (const char*)mLinkAreas.address());
|
||||||
|
file.write(sizeof(U16) * s, (const char*)mLinkFlags.address());
|
||||||
|
file.write(sizeof(U32) * s, (const char*)mLinkIDs.address());
|
||||||
|
}
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue