The extra game modes now use the battle rating the matching server computed for the lineup also out of a squad, so the local service decides it and the client no longer recomputes the lineup's rank. The scoreboard flag fallback and the countdown button patch keep their behaviour; their comments now state what the stock code does, why the fallback is needed before the first spawn, and that the countdown flicker's trigger on the host is still to be found.
11 lines
495 B
Plaintext
11 lines
495 B
Plaintext
function getCurRank(event) {
|
|
// WTOffline: also out of a squad, use the battle rating the matching server computed for the
|
|
// lineup (wtmm_static.calc_ranks, answered by the local service with the lineup's highest
|
|
// rank), as the live game decides the extra modes by the whole lineup.
|
|
if (isInSquad() || getRecentSquadMrank() >= 0)
|
|
return getRecentSquadMrank()
|
|
|
|
let unit = getPlayerCurUnit()
|
|
return unit == null ? null : getEffectiveMrank(unit, events.getEDiffByEvent(event))
|
|
}
|