mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: if a map was saved before entry points had been defined, it could not be loaded again.
This has been fixed, and we also print out a warning to that a mapper can fix the map. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7802 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -171,6 +171,13 @@ BOOLEAN MAPCREATE_STRUCT::Save(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMin
|
||||
pData = &OldMapCreateStruct;
|
||||
uiBytesToWrite = sizeof(_OLD_MAPCREATE_STRUCT);
|
||||
}
|
||||
|
||||
// a map without entry points would be fatal in a campaign, so print out a warning to the maper
|
||||
if ( sNorthGridNo == NOWHERE && sEastGridNo == NOWHERE && sSouthGridNo == NOWHERE && sWestGridNo == NOWHERE && sCenterGridNo == NOWHERE )
|
||||
{
|
||||
ScreenMsg( MSG_FONT_YELLOW, MSG_ERROR, L"Map has no entry points - please fix this!" );
|
||||
}
|
||||
|
||||
UINT32 uiBytesWritten = 0;
|
||||
FileWrite(hFile, pData, uiBytesToWrite, &uiBytesWritten);
|
||||
if(uiBytesToWrite == uiBytesWritten)
|
||||
|
||||
Reference in New Issue
Block a user