summaryrefslogtreecommitdiff
path: root/subscriber.py
diff options
context:
space:
mode:
Diffstat (limited to 'subscriber.py')
-rw-r--r--subscriber.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/subscriber.py b/subscriber.py
index 1dcccc6..feddf04 100644
--- a/subscriber.py
+++ b/subscriber.py
@@ -95,4 +95,14 @@ class EnhancingSubscriber(DummySubscriber):
self.history[cid].stale = False
self.history = {k: v for k, v in self.history.items() if v.stale == False}
+
+ for cid in self.c.world.cells:
+ cell = self.c.world.cells[cid]
+ try:
+ oldpos = cell.poslog[-3-1]
+ cell.movement = (cell.pos - oldpos)/3
+ except (AttributeError, IndexError):
+ # no oldpos available
+ cell.movement = None
+ pass