Skip to content

Commit

Permalink
Fix list index out of range for get_player_death_on_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Drevarr committed Nov 26, 2024
1 parent 17e4826 commit b78d9dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions output_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def create_new_tid_from_template(
temp_tid['creator'] = creator
if fields:
for field, value in fields.items():
print("Creating field: " + field+" with value: " + value)
temp_tid[field] = value

return temp_tid
Expand Down Expand Up @@ -2156,7 +2155,6 @@ def build_on_tag_review(death_on_tag, tid_date_time):
header = "|!Player |!Profession | !Avg Dist| !On-Tag<br>{{deadCount}} | !Off-Tag<br>{{deadCount}} | !After-Tag<br>{{deadCount}} | !Run-Back<br>{{deadCount}} | !Total<br>{{deadCount}} |!OffTag Ranges|h"
rows.append(header)
for name_prof in death_on_tag:
print(name_prof, "on tag review")
player = death_on_tag[name_prof]['name']
profession = death_on_tag[name_prof]['profession']
if len(death_on_tag[name_prof]['distToTag']):
Expand Down
2 changes: 1 addition & 1 deletion parser_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get_player_death_on_tag(player, commander_tag_positions, dead_tag_mark, dead
if death_key < 0: # Handle death on the field before main squad combat log starts
continue

position_mark = math.ceil(death_key / polling_rate)
position_mark = math.floor(death_key / polling_rate)
player_positions = player['combatReplayData']['positions']

for down_key, down_value in player_downs.items():
Expand Down

0 comments on commit b78d9dd

Please sign in to comment.