Skip to content

Commit 60b6e0f

Browse files
committed
Fix replay.active_units management.
1 parent 1395627 commit 60b6e0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sc2reader/events/tracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ def load_context(self, replay):
188188
# TODO: How to tell if something is hallucination?
189189
self.unit = replay.datapack.create_unit(self.unit_id, self.unit_type_name, 0, self.frame)
190190
replay.objects[self.unit_id] = self.unit
191-
replay.active_units[self.unit_id_index] = self.unit
192191

192+
replay.active_units[self.unit_id_index] = self.unit
193193
self.unit.location = self.location
194194
self.unit.birth = self.frame
195195
self.unit.owner = self.unit_upkeeper
@@ -395,8 +395,8 @@ def load_context(self, replay):
395395
# TODO: How to tell if something is hallucination?
396396
self.unit = replay.datapack.create_unit(self.unit_id, self.unit_type_name, 0, self.frame)
397397
replay.objects[self.unit_id] = self.unit
398-
replay.active_units[self.unit_id_index] = self.unit
399398

399+
replay.active_units[self.unit_id_index] = self.unit
400400
self.unit.owner = self.unit_upkeeper
401401
self.unit.location = self.location
402402
self.unit.birth = self.frame

0 commit comments

Comments
 (0)