Skip to content

Commit c74ac0f

Browse files
committed
Drop legacy detection in FriendlyPlayerExporter
This is leading to misleading results in games with non-trivial player ids (e.g. Battlegrounds).
1 parent df4c4d7 commit c74ac0f

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

hslog/export.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,6 @@ def handle_full_entity(self, packet):
212212
if GameTag.CONTROLLER in tags:
213213
self._controller_map[packet.entity] = tags[GameTag.CONTROLLER]
214214

215-
# The following logic only works for pre-13619 logs
216-
# The first FULL_ENTITY packet which is in Zone.HAND and does *not*
217-
# have an ID is owned by the friendly player's *opponent*.
218-
if tags.get(GameTag.ZONE, 0) == Zone.HAND and not packet.card_id:
219-
controller = self._controller_map[packet.entity]
220-
# That controller is the enemy player - return its opponent.
221-
self.friendly_player = controller % 2 + 1
222-
223215
def handle_show_entity(self, packet):
224216
tags = dict(packet.tags)
225217
if GameTag.CONTROLLER in tags:

0 commit comments

Comments
 (0)