mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Re-add Debug messages when door structures are missing (#95)
Uncovered in #87
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user