1
0
Fork 0

AIAircraft: fix type of non-Swift aircraft

This commit is contained in:
James Turner 2020-09-02 21:33:48 +01:00
parent d1fc4b58cb
commit 61c6cfb050
3 changed files with 4 additions and 3 deletions

View file

@ -19,7 +19,8 @@
#include <Main/globals.hxx>
FGAIBaseAircraft::FGAIBaseAircraft() : FGAIBase(otStatic, false)
FGAIBaseAircraft::FGAIBaseAircraft(object_type ot) :
FGAIBase(ot, false)
{
m_gearPos = 0.0f;
m_flapsPos = 0.0f;

View file

@ -25,7 +25,7 @@
class FGAIBaseAircraft : public FGAIBase {
public:
FGAIBaseAircraft();
FGAIBaseAircraft(object_type otype = FGAIBase::otAircraft);
void bind() override;

View file

@ -21,7 +21,7 @@
#include <Main/globals.hxx>
FGAISwiftAircraft::FGAISwiftAircraft(const std::string& callsign, const std::string& modelString) : FGAIBaseAircraft()
FGAISwiftAircraft::FGAISwiftAircraft(const std::string& callsign, const std::string& modelString) : FGAIBaseAircraft(otStatic)
{
std::size_t pos = modelString.find("/Aircraft/"); // Only supporting AI models from FGDATA/AI/Aircraft for now
if(pos != std::string::npos)