Skip to content

Commit ac68055

Browse files
alexp8Sneer-ra2
andauthored
Develop to main with bug fix (#393)
* Duplicate handling. * Added page of list with active duplicates. * Full IP-check for confirmed duplicates. * Simplification. * Removed comment. * Small update. * Added database migration. * Added unit test. * track observers * move comment * update image.php * fix null pointer (#379) * Develop (#380) (#381) * Duplicate handling. * Added page of list with active duplicates. * Full IP-check for confirmed duplicates. * Simplification. * Removed comment. * Small update. * Added database migration. * Added unit test. * track observers * move comment * update image.php * fix null pointer (#379) --------- Co-authored-by: Sneer <[email protected]> Co-authored-by: Sneer-ra2 <[email protected]> * add more logs (#382) * add more logs * update log * Fix for createPlayer. * fix bug where disconnect gave everyone minus points (#385) * fix bug where disconnect gave everyone minus points * fix ladder info map issue * Improved naming on elo page. * Improved description for duplicate reason. * bug fix * Database migration for user ratings. Player details and tooltip adjustments. * Updated admin rating page. * Quick fix. * Simplified conditions. * Fixed user settings update. * new implementation (#390) * verify observer is streaming on twitch (#384) * Show bans from duplicates. (#389) Co-authored-by: Alex Peterson <[email protected]> * bug fix (#392) --------- Co-authored-by: Sneer <[email protected]> Co-authored-by: Sneer-ra2 <[email protected]>
1 parent 2e25d35 commit ac68055

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cncnet-api/app/Http/Services/GameService.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public function saveGameStats($result, $gameId, $playerId, $ladder, $cncnetGame)
142142

143143
$qmPlayer = $game->qmMatch->findQmPlayerByPlayerId($playerHere->id);
144144
$playerGameReports[$id]->team = $qmPlayer?->team;
145+
146+
// Note: YR spawner is not currently producing stats.dmp for observers. Impact: a player game report won't be created for the observer, so this current qmPlayer check won't ever be an observer
145147
$playerGameReports[$id]->spectator = $qmPlayer?->is_observer ?? false;
146148

147149
if ($isClanLadderGame)
@@ -230,8 +232,8 @@ public function saveGameStats($result, $gameId, $playerId, $ladder, $cncnetGame)
230232
$playerGameReports[$cid]->local_team_id = $cid;
231233
break;
232234

233-
case "SPC": // ?? this does not work, observer is not even uploading a stats.dmp
234-
// $playerGameReports[$cid]->spectator = $value["value"];
235+
case "SPC":
236+
$playerGameReports[$cid]->spectator = $value["value"];
235237
break;
236238

237239
case "LCN": // TS lost connection

cncnet-api/app/Http/Services/PlayerService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function findUserRatingByPlayerId($pid)
8080
{
8181
$player = Player::find($pid);
8282
$user = $player->user;
83-
$userRating = $user->getEffectiveUserRating();
83+
$userRating = $user->getEffectiveUserRatingForLadder($player->ladder_id);
8484

8585
return $userRating;
8686
}

0 commit comments

Comments
 (0)