Re-add Debug messages when door structures are missing (#95)

Uncovered in #87
This commit is contained in:
majcosta
2023-01-19 12:10:27 +02:00
committed by GitHub
parent a55dab43b2
commit e62fa859ff
+10
View File
@@ -1167,6 +1167,11 @@ BOOLEAN LoadDoorTableFromDoorTableTempFile( )
static auto ComplainAboutMissingDoorStructure(const INT32 GridNo) {
#if JA2TESTVERSION
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_BETAVERSION, L"Door structure data at %d was not found", GridNo);
#endif
}
// fOpen is True if the door is open, false if it is closed
BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen )
@@ -1190,6 +1195,7 @@ BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fPerceivedOpen )
if ( pBaseStructure == NULL )
{
ComplainAboutMissingDoorStructure(sGridNo);
return( FALSE );
}
@@ -1311,6 +1317,7 @@ BOOLEAN IsDoorOpen( INT32 sGridNo )
if ( pBaseStructure == NULL )
{
ComplainAboutMissingDoorStructure(sGridNo);
return( FALSE );
}
@@ -1361,6 +1368,7 @@ DOOR_STATUS *GetDoorStatus( INT32 sGridNo )
if ( pBaseStructure == NULL )
{
ComplainAboutMissingDoorStructure(sGridNo);
return( NULL );
}
@@ -1521,6 +1529,7 @@ void SyncronizeDoorStatusToStructureData( DOOR_STATUS *pDoorStatus )
if ( pBaseStructure == NULL )
{
ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo);
return;
}
@@ -1602,6 +1611,7 @@ void InternalUpdateDoorGraphicFromStatus( DOOR_STATUS *pDoorStatus, BOOLEAN fUse
if ( pBaseStructure == NULL )
{
ComplainAboutMissingDoorStructure(pDoorStatus->sGridNo);
return;
}