Skip to content

Commit c37df7f

Browse files
committed
Change 'VikingAssault' selections to 'Viking'.
Only applies to bnet 2.0+ replays which implement a new selection type behavior that disregards the current mode for the unit. Only vikings need a hack because the "deafult" form is now assault.
1 parent 80fc961 commit c37df7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sc2reader/events.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ def load_context(self, replay):
338338
objects = list()
339339
data = replay.datapack
340340
for (obj_id, obj_type, obj_flags) in self.raw_objects:
341+
# Hack that defaults viking selection to fighter mode instead of assault
342+
if replay.versions[1] == 2 and replay.build >= 23925 and obj_type == 71:
343+
obj_type = 72
344+
341345
if (obj_id, obj_type) in replay.objects:
342346
obj = replay.objects[(obj_id,obj_type)]
343347
else:

0 commit comments

Comments
 (0)