Skip to content

Commit

Permalink
improve bot handling
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Jun 30, 2024
1 parent af0d665 commit 1a83803
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Demo/DemoSaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ public function saveDemo(ParsedDemo $demo, Header $header, StoredDemo $storedDem
}

foreach ($demo->getKills() as $kill) {
if ($kill->getAttackerDemoId()) {
if ($kill->getAttackerDemoId() && isset($kills[$kill->getAttackerDemoId()])) {
++$kills[$kill->getAttackerDemoId()];
}
if ($kill->getAssisterDemoId()) {
if ($kill->getAssisterDemoId() && isset($kills[$kill->getAssisterDemoId()])) {
++$assists[$kill->getAssisterDemoId()];
}
if ($kill->getVictimDemoId()) {
if ($kill->getVictimDemoId() && isset($kills[$kill->getVictimDemoId()])) {
++$deaths[$kill->getVictimDemoId()];
}
}
Expand Down

0 comments on commit 1a83803

Please sign in to comment.