Ref T717, simulator "is test" conditions where required

This commit is contained in:
Klaus Basan
2019-09-14 23:43:53 +02:00
committed by Mat Sutcliffe
parent a3959ffbea
commit 6151f434c6
3 changed files with 3 additions and 2 deletions

View File

@@ -480,7 +480,7 @@ namespace BlackSimPlugin
// crosscheck if still a valid aircraft
// it can happen that aircraft has been removed, timed out ...
if (!this->isAircraftInRange(newRemoteAircraft.getCallsign()))
if (!this->isAircraftInRangeOrTestMode(newRemoteAircraft.getCallsign()))
{
// next cycle will be called by callbacks or timer
CLogMessage(this).warning(u"Aircraft '%1' no longer in range, will not add") << newRemoteAircraft.getCallsign();

View File

@@ -1175,7 +1175,7 @@ namespace BlackSimPlugin
void CSimulatorFsxCommon::timerBasedObjectAddOrRemove()
{
this->addPendingAircraft(AddByTimer);
this->physicallyRemoveAircraftNotInProvider();
if (!this->isTestMode()) { this->physicallyRemoveAircraftNotInProvider(); }
}
void CSimulatorFsxCommon::addPendingAircraftAfterAdded()

View File

@@ -325,6 +325,7 @@ namespace BlackSimPlugin
// remove the invalid ones
int i = 0;
if (this->isTestMode()) { invalid.clear(); } // skip this in test mode
for (const CCallsign &cs : invalid)
{
this->triggerRemoveAircraft(cs, ++i * 100);