Skip to content

Commit 8dc1f13

Browse files
dsjoergGraylinKim
authored andcommitted
coordinates for UnitFooEvent need to be multiplied by four
1 parent f20aed1 commit 8dc1f13

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sc2reader/events/tracker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ def __init__(self, frames, data):
217217
self.unit_controller = None
218218

219219
#: The x coordinate of the location
220-
self.x = data[5]
220+
self.x = data[5] * 4
221221

222222
#: The y coordinate of the location
223-
self.y = data[6]
223+
self.y = data[6] * 4
224224

225225
#: The map location of the unit birth
226226
self.location = (self.x, self.y)
@@ -281,10 +281,10 @@ def __init__(self, frames, data):
281281
self.killer = None
282282

283283
#: The x coordinate of the location
284-
self.x = data[3]
284+
self.x = data[3] * 4
285285

286286
#: The y coordinate of the location
287-
self.y = data[4]
287+
self.y = data[4] * 4
288288

289289
#: The map location the unit was killed at.
290290
self.location = (self.x, self.y)
@@ -466,10 +466,10 @@ def __init__(self, frames, data):
466466
self.unit_controller = None
467467

468468
#: The x coordinate of the location
469-
self.x = data[5]
469+
self.x = data[5] * 4
470470

471471
#: The y coordinate of the location
472-
self.y = data[6]
472+
self.y = data[6] * 4
473473

474474
#: The map location the unit was started at
475475
self.location = (self.x, self.y)

0 commit comments

Comments
 (0)