mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Ref T717, simulator "is test" conditions where required
This commit is contained in:
committed by
Mat Sutcliffe
parent
a3959ffbea
commit
6151f434c6
@@ -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();
|
||||
|
||||
@@ -1175,7 +1175,7 @@ namespace BlackSimPlugin
|
||||
void CSimulatorFsxCommon::timerBasedObjectAddOrRemove()
|
||||
{
|
||||
this->addPendingAircraft(AddByTimer);
|
||||
this->physicallyRemoveAircraftNotInProvider();
|
||||
if (!this->isTestMode()) { this->physicallyRemoveAircraftNotInProvider(); }
|
||||
}
|
||||
|
||||
void CSimulatorFsxCommon::addPendingAircraftAfterAdded()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user