Reposition hook for terrasync.
When re-init-ing the sim, tell TerraSync what's going on (we don't want to actually reset it, since that would disturb in-flight downloads). Add an explicit method so it can reset its last lon/lat, and hence do the initial sync at the new location correctly.
This commit is contained in:
@@ -1041,3 +1041,7 @@ bool SGTerraSync::schedulePosition(int lat, int lon)
|
||||
return Ok;
|
||||
}
|
||||
|
||||
void SGTerraSync::reposition()
|
||||
{
|
||||
last_lat = last_lon = NOWHERE;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,11 @@ public:
|
||||
virtual void unbind();
|
||||
virtual void update(double);
|
||||
|
||||
/// notify terrasync that the sim was repositioned, as opposed to
|
||||
/// us travelling in a direction. Avoid last_lat / last_lon blocking
|
||||
/// certain tiles when we reposition.
|
||||
void reposition();
|
||||
|
||||
bool isIdle();
|
||||
bool schedulePosition(int lat, int lon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user