mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +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)
|
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;
|
XPMPPlaneID id = nullptr;
|
||||||
if (modelName.empty())
|
if (modelName.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user