Settle the open questions of three LocalMP respawn and scoreboard patches
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.
This commit is contained in:
1 parent
8febf2d94e
commit
f8735e5ca5
4 files changed
+25
-27
No files matched your search
@@ -1,10 +1,13 @@
|
||||
// Battle patch pending review in the LocalMP rework; its comment is rewritten when the review concludes.
|
||||
// Decide the extra game modes (night battles and the like) by the lineup's battle rating, also out of a squad.
|
||||
// Why the client: 2.61.0.37 scripts/events/secondGameModesUtils.nut uses the matching server's
|
||||
// battle rating only in a squad and the selected vehicle otherwise; the live game uses the lineup.
|
||||
// Without it: the extra modes follow whichever vehicle is selected.
|
||||
{
|
||||
"id": "battle/lineup-br-for-submodes",
|
||||
"title": "多槽位预设模式下按整套可用出击阵容最高权重判定夜间战斗等附加子模式可用性",
|
||||
"title": "Decide extra game modes by the matching server's lineup battle rating",
|
||||
"file": "scripts/events/secondgamemodesutils.nut",
|
||||
"features": [
|
||||
"J-对局模式目录与队列"
|
||||
"J-附加子模式"
|
||||
],
|
||||
"verified_on": [
|
||||
"2.61.0.37"
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
function getCurRank(event) {
|
||||
if (isInSquad())
|
||||
// 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 ediff = events.getEDiffByEvent(event)
|
||||
if (events.isEventMultiSlotEnabled(event)) {
|
||||
let ownCraftNames = getOwnCraftNames()
|
||||
let mrankDeltaByUnit = getMrankDeltaByUnit(ownCraftNames)
|
||||
local maxMrank = null
|
||||
foreach (unitName in ownCraftNames) {
|
||||
let unit = getAircraftByName(unitName)
|
||||
if (unit != null && events.isUnitAllowedForEvent(event, unit)) {
|
||||
let mrank = getEffectiveMrank(unit, ediff, mrankDeltaByUnit?[unitName] ?? 0)
|
||||
maxMrank = maxMrank == null ? mrank : max(maxMrank, mrank)
|
||||
}
|
||||
}
|
||||
if (maxMrank != null)
|
||||
return maxMrank
|
||||
}
|
||||
|
||||
let unit = getPlayerCurUnit()
|
||||
return unit == null ? null : getEffectiveMrank(unit, ediff)
|
||||
return unit == null ? null : getEffectiveMrank(unit, events.getEDiffByEvent(event))
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
// Battle patch pending review in the LocalMP rework; its comment is rewritten when the review concludes.
|
||||
// Show the battle's configured countries as a team's flags on the scoreboard while none of its players has a vehicle.
|
||||
// Why the client: scripts/statistics/mpStatistics.nut getCountriesByTeam derives flags only from the
|
||||
// players' living vehicles, which nobody has before the first spawn (offline design: the live
|
||||
// game's look during the countdown cannot be checked).
|
||||
// Without it: no team flags during the start countdown.
|
||||
{
|
||||
"id": "battle/scoreboard-team-country-flags",
|
||||
"title": "开局倒计时载具尚未生成前从房间国家配置回退渲染计分板双方参战国旗",
|
||||
"title": "Fall back to the battle's countries for scoreboard flags before anyone spawns",
|
||||
"file": "scripts/statistics/mpstatistics.nut",
|
||||
"features": [
|
||||
"K-战局任务加载"
|
||||
"K-计分板"
|
||||
],
|
||||
"verified_on": [
|
||||
"2.61.0.37"
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
// Battle patch pending review in the LocalMP rework; its comment is rewritten when the review concludes.
|
||||
// Keep the respawn countdown in the "Cancel" button text whenever the button text is rebuilt.
|
||||
// Why the client: on a LocalMP host updateApplyText (scripts/respawn/respawn.nut) runs again during
|
||||
// the countdown and resets the text to "Cancel", which updateCountdown turns back into "Cancel (N s)"
|
||||
// on the next frame; the trigger on the host is not yet known.
|
||||
// Without it: the button flickers between "Cancel" and "Cancel (N s)" while waiting to spawn.
|
||||
{
|
||||
"id": "battle/stabilize-respawn-countdown-button",
|
||||
"title": "开局倒计时期间保持重生主按钮同步显示剩余秒数避免与「取消」来回闪烁",
|
||||
"title": "Keep the respawn countdown in the rebuilt Cancel button text",
|
||||
"file": "scripts/respawn/respawn.nut",
|
||||
"features": [
|
||||
"K-战局任务加载"
|
||||
"K-出生点数 / 重生"
|
||||
],
|
||||
"verified_on": [
|
||||
"2.61.0.37"
|
||||
|
||||
Reference in new issue
Block a user