Skip to content

Commit

Permalink
Fix bug with disconnect mod merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGlazov committed Jun 21, 2021
1 parent fa16e05 commit 57b378c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@ Version 1.5.4

Version 1.6.0

- Update to 2.2.0 of enhancements, 1.3.0 of global aircraft stats.
- Update to 2.2.0 of enhancements, 1.3.0 of global aircraft stats.

Version 1.6.1

- Fix bug with bundling which caused disconnect mod to not end streaks of people who died by disconnecting.
4 changes: 4 additions & 0 deletions src/mod_stats_by_aircraft/stats_whore.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ def stats_whore(m_report_file):
params['type'] = 'end'
params['act_object_id'] = event['sortie'].sortie_db.aircraft.id
params['act_sortie_id'] = event['sortie'].sortie_db.id
elif event['type'] == 'disco':
params['type'] = 'disco'
params['act_object_id'] = event['sortie'].sortie_db.aircraft.id
params['act_sortie_id'] = event['sortie'].sortie_db.id
elif event['type'] == 'takeoff':
params['type'] = 'takeoff'
params['act_object_id'] = event['aircraft'].sortie.sortie_db.aircraft.id
Expand Down
4 changes: 2 additions & 2 deletions src/stats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,11 +1264,11 @@ def is_in_flight(self):
# change added so when discobailout or damageddisco(when not shotdown) events = True, lost airplane for thouse sorties counts in total airplane lost for player
@property
def is_ditched(self):
return self.status == SortieStatus.crashed or self.is_captured or self.is_bailout
return self.status == SortieStatus.ditched

@property
def is_crashed(self):
return self.status == SortieStatus.crashed
return self.status == SortieStatus.crashed or self.is_captured or self.is_bailout

@property
def is_shotdown(self):
Expand Down

0 comments on commit 57b378c

Please sign in to comment.