StelObserver.cpp   StelObserver.cpp 
skipping to change at line 55 skipping to change at line 55
static Vec3d getRot(const Planet* p); static Vec3d getRot(const Planet* p);
PlanetP dest; PlanetP dest;
const QString orig_name; const QString orig_name;
const QString orig_name_i18n; const QString orig_name_i18n;
}; };
ArtificialPlanet::ArtificialPlanet(const PlanetP& orig) : ArtificialPlanet::ArtificialPlanet(const PlanetP& orig) :
Planet("", 0, 0, 0, Vec3f(0,0,0), 0, "", "", NULL, NULL, 0, false, true, false, true, ""), dest(0), Planet("", 0, 0, 0, Vec3f(0,0,0), 0, "", "", NULL, NULL, 0, false, true, false, true, ""), dest(0),
orig_name(orig->getEnglishName()), orig_name_i18n(orig->getN ameI18n()) orig_name(orig->getEnglishName()), orig_name_i18n(orig->getN ameI18n())
{ {
radius = 0;
// set parent = sun: // set parent = sun:
if (orig->getParent()) if (orig->getParent())
{ {
parent = orig->getParent(); parent = orig->getParent();
while (parent->getParent()) while (parent->getParent())
parent = parent->getParent(); parent = parent->getParent();
} }
else else
{ {
parent = orig; // sun parent = orig; // sun
skipping to change at line 275 skipping to change at line 274
} }
planet = targetPlanet; planet = targetPlanet;
} }
SpaceShipObserver::~SpaceShipObserver() SpaceShipObserver::~SpaceShipObserver()
{ {
artificialPlanet.clear(); artificialPlanet.clear();
planet.clear(); planet.clear();
} }
void SpaceShipObserver::update(double deltaTime) bool SpaceShipObserver::update(double deltaTime)
{ {
if (timeToGo <= 0.) return false; // Already over.
timeToGo -= deltaTime; timeToGo -= deltaTime;
// If move is over // If move is over
if (timeToGo <= 0.) if (timeToGo <= 0.)
{ {
timeToGo = 0.; timeToGo = 0.;
currentLocation = moveTargetLocation; currentLocation = moveTargetLocation;
LandscapeMgr* ls = GETSTELMODULE(LandscapeMgr); LandscapeMgr* ls = GETSTELMODULE(LandscapeMgr);
SolarSystem* ss = GETSTELMODULE(SolarSystem); SolarSystem* ss = GETSTELMODULE(SolarSystem);
if (ls->getFlagLandscapeAutoSelection()) if (ls->getFlagLandscapeAutoSelection())
skipping to change at line 321 skipping to change at line 321
currentLocation.name = moveStartLocation.name + " -> " + moveTargetLocation.name; currentLocation.name = moveStartLocation.name + " -> " + moveTargetLocation.name;
currentLocation.planetName = moveTargetLocation.plan etName; currentLocation.planetName = moveTargetLocation.plan etName;
} }
// Move the lon/lat/alt on the planet // Move the lon/lat/alt on the planet
const double moveToMult = 1.-(timeToGo/transitSeconds); const double moveToMult = 1.-(timeToGo/transitSeconds);
currentLocation.latitude = moveStartLocation.latitude - move ToMult*(moveStartLocation.latitude-moveTargetLocation.latitude); currentLocation.latitude = moveStartLocation.latitude - move ToMult*(moveStartLocation.latitude-moveTargetLocation.latitude);
currentLocation.longitude = moveStartLocation.longitude - mo veToMult*(moveStartLocation.longitude-moveTargetLocation.longitude); currentLocation.longitude = moveStartLocation.longitude - mo veToMult*(moveStartLocation.longitude-moveTargetLocation.longitude);
currentLocation.altitude = int(moveStartLocation.altitude - moveToMult*(moveStartLocation.altitude-moveTargetLocation.altitude)); currentLocation.altitude = int(moveStartLocation.altitude - moveToMult*(moveStartLocation.altitude-moveTargetLocation.altitude));
} }
return true;
} }
const QSharedPointer<Planet> SpaceShipObserver::getHomePlanet() const const QSharedPointer<Planet> SpaceShipObserver::getHomePlanet() const
{ {
return (isObserverLifeOver() || artificialPlanet==NULL) ? planet : artificialPlanet; return (isObserverLifeOver() || artificialPlanet==NULL) ? planet : artificialPlanet;
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/