This got broken in the reorg; it's still possible for someone
to be asking for scene updates starting farther back than what we know about, so notice that case & return back a null list of updates rather than an incomplete one. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@575 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -72,6 +72,12 @@ public class UpdateList
|
|||||||
*/
|
*/
|
||||||
public SceneUpdate[] getUpdates (int fromVersion)
|
public SceneUpdate[] getUpdates (int fromVersion)
|
||||||
{
|
{
|
||||||
|
// If we don't have updates, or our updates start from someplace later than our fromVersion,
|
||||||
|
// we can't give updates from our known ones.
|
||||||
|
if (_updates.size() == 0 || _updates.get(0).getSceneVersion() > fromVersion) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
List<SceneUpdate> updates = Lists.newArrayList();
|
List<SceneUpdate> updates = Lists.newArrayList();
|
||||||
for (SceneUpdate update : _updates) {
|
for (SceneUpdate update : _updates) {
|
||||||
if (update.getSceneVersion() >= fromVersion) {
|
if (update.getSceneVersion() >= fromVersion) {
|
||||||
|
|||||||
Reference in New Issue
Block a user