mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
[xswiftbus] Check if plane exists already before adding a new one
This commit is contained in:
committed by
Klaus Basan
parent
48b1b78d81
commit
dab41045d3
@@ -212,6 +212,9 @@ namespace XSwiftBus
|
||||
|
||||
void CTraffic::addPlane(const std::string &callsign, const std::string &modelName, const std::string &aircraftIcao, const std::string &airlineIcao, const std::string &livery)
|
||||
{
|
||||
auto planeIt = m_planesByCallsign.find(callsign);
|
||||
if (planeIt != m_planesByCallsign.end()) { return; }
|
||||
|
||||
XPMPPlaneID id = nullptr;
|
||||
if (modelName.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user