Skip to content

Commit a632750

Browse files
committed
fix processing of unit_upkeeper for tracker events
1 parent 8179b43 commit a632750

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sc2reader/engine/plugins/context.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ def handleUnitOwnerChangeEvent(self, event, replay):
148148
print "Unit owner changed before it was born!"
149149

150150
if event.unit_upkeeper:
151-
if unit.owner:
152-
print "stduff"
153-
unit.owner.units.remove(unit)
154-
unit.owner = event.unit_upkeeper
155-
event.unit_upkeeper.units.append(unit)
151+
if event.unit.owner:
152+
event.unit.owner.units.remove(unit)
153+
event.unit.owner = event.unit_upkeeper
154+
event.unit_upkeeper.units.append(event.unit)
156155

157156
def handleUnitTypeChangeEvent(self, event, replay):
158157
if not replay.datapack: return

0 commit comments

Comments
 (0)