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:
James Turner
2013-09-27 20:28:43 +01:00
parent 61516a5e97
commit add14dd27c
2 changed files with 9 additions and 0 deletions

View File

@@ -1041,3 +1041,7 @@ bool SGTerraSync::schedulePosition(int lat, int lon)
return Ok;
}
void SGTerraSync::reposition()
{
last_lat = last_lon = NOWHERE;
}

View File

@@ -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);