Skip to content

Commit 50aa557

Browse files
committed
Fix small bugs in PTR support.
1 parent 9c06d28 commit 50aa557

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

sc2reader/readers.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,18 @@ def hijack_replay_game_event(self, data):
13691369
method=data.read_bits(1),
13701370
)
13711371

1372+
def camera_update_event(self, data):
1373+
return dict(
1374+
target=dict(
1375+
x=data.read_uint16(),
1376+
y=data.read_uint16(),
1377+
) if data.read_bool() else None,
1378+
distance=data.read_uint16() if data.read_bool() else None,
1379+
pitch=data.read_uint16() if data.read_bool() else None,
1380+
yaw=data.read_uint16() if data.read_bool() else None,
1381+
reason=None,
1382+
)
1383+
13721384
def trigger_target_mode_update_event(self, data):
13731385
return dict(
13741386
ability_link=data.read_uint16(),
@@ -1399,7 +1411,7 @@ def user_options_event(self, data):
13991411
sync_checksumming_enabled=data.read_bool(),
14001412
is_map_to_map_transition=data.read_bool(),
14011413
starting_rally=data.read_bool(),
1402-
debug_pause_enabled=None,
1414+
debug_pause_enabled=data.read_bool(),
14031415
base_build_num=data.read_uint32(),
14041416
use_ai_beacons=None,
14051417
)
@@ -1455,7 +1467,7 @@ def camera_update_event(self, data):
14551467
target=dict(
14561468
x=data.read_uint16(),
14571469
y=data.read_uint16(),
1458-
),
1470+
) if data.read_bool() else None,
14591471
distance=data.read_uint16() if data.read_bool() else None,
14601472
pitch=data.read_uint16() if data.read_bool() else None,
14611473
yaw=data.read_uint16() if data.read_bool() else None,

0 commit comments

Comments
 (0)