Slight change in logic, we only need to snapshot static objects during a REMOVE update, and any other entities during an ADD update.

This commit is contained in:
Steve
2015-04-10 08:16:58 -04:00
parent 48b6dc7122
commit a658e1e8c7
+2 -1
View File
@@ -315,7 +315,8 @@ public final class Region {
updates.get(height).add(message);
snapshots.get(height).remove(entity);
if (entity.getEntityType() != EntityType.STATIC_OBJECT || type == EntityUpdateType.REMOVE) {
if ((entity.getEntityType() == EntityType.STATIC_OBJECT && type == EntityUpdateType.REMOVE) ||
(entity.getEntityType() != EntityType.STATIC_OBJECT && type == EntityUpdateType.ADD)) {
snapshots.get(height).put(entity, message);
}
}