diff --git a/Tactical/Keys.cpp b/Tactical/Keys.cpp index f7c53fea0..b5e9c0c30 100644 --- a/Tactical/Keys.cpp +++ b/Tactical/Keys.cpp @@ -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; }