Skip to content

Commit 353230b

Browse files
committed
Fix camera location parsing.
1 parent bc55f58 commit 353230b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sc2reader/readers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,8 @@ def player_request_resource_event(self, data, fstamp, pid, event_type):
359359

360360
def camera_event(self, data, fstamp, pid, event_type):
361361
# From https://github.com/Mischanix/sc2replay-csharp/wiki/replay.game.events
362-
block = data.read_int(BIG_ENDIAN)
363-
x = (block >> 16)/256.0
364-
y = (block & 0xFFFF)/256.0
362+
x = data.read_short(BIG_ENDIAN)/256.0
363+
y = data.read_short(BIG_ENDIAN)/256.0
365364
distance = pitch = yaw = height = 0
366365
if data.read_bits(1):
367366
distance = data.read_short(BIG_ENDIAN)/256.0

0 commit comments

Comments
 (0)