mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +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
|
// crosscheck if still a valid aircraft
|
||||||
// it can happen that aircraft has been removed, timed out ...
|
// 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
|
// next cycle will be called by callbacks or timer
|
||||||
CLogMessage(this).warning(u"Aircraft '%1' no longer in range, will not add") << newRemoteAircraft.getCallsign();
|
CLogMessage(this).warning(u"Aircraft '%1' no longer in range, will not add") << newRemoteAircraft.getCallsign();
|
||||||
|
|||||||
@@ -1175,7 +1175,7 @@ namespace BlackSimPlugin
|
|||||||
void CSimulatorFsxCommon::timerBasedObjectAddOrRemove()
|
void CSimulatorFsxCommon::timerBasedObjectAddOrRemove()
|
||||||
{
|
{
|
||||||
this->addPendingAircraft(AddByTimer);
|
this->addPendingAircraft(AddByTimer);
|
||||||
this->physicallyRemoveAircraftNotInProvider();
|
if (!this->isTestMode()) { this->physicallyRemoveAircraftNotInProvider(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorFsxCommon::addPendingAircraftAfterAdded()
|
void CSimulatorFsxCommon::addPendingAircraftAfterAdded()
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
// remove the invalid ones
|
// remove the invalid ones
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
if (this->isTestMode()) { invalid.clear(); } // skip this in test mode
|
||||||
for (const CCallsign &cs : invalid)
|
for (const CCallsign &cs : invalid)
|
||||||
{
|
{
|
||||||
this->triggerRemoveAircraft(cs, ++i * 100);
|
this->triggerRemoveAircraft(cs, ++i * 100);
|
||||||
|
|||||||
Reference in New Issue
Block a user