fix(battle): write root numBotRespawns and numTankBotRespawns for all modes
MissionSettings::load (2.61.0.37 0x126b1f4..0x126b2e6) initializes AI respawn limits from global config/bots.blk defaults (numBotRespawnsInMultiSlot=1, numTankBotRespawnsInMultiSlot=3) and then overrides them from the mission root fields numBotRespawns and numTankBotRespawns rather than customRules/customBots. Previously only single-slot modes wrote numBotRespawns at the mission root, so Air Arcade and other multi-slot modes stayed at 1 aircraft respawn and all modes ignored tuning.battle.tankBotRespawns. Write both root fields unconditionally using the per-mode values already resolved by BattleMatchmaker. Credit to duduyagame for identifying the missing root numBotRespawns in Air Arcade (PR #7). Checks: root `npm run typecheck` passed. In-game acceptance pending on an isolated client copy. Co-authored-by: duduyagame <[email protected]>
This commit is contained in:
1 parent
594ff5ab54
commit
42b8275151
1 file changed
+4
-2
@@ -76,9 +76,11 @@ export function battleMissionSettings(plan: BattleLaunchPlan, scores: Readonly<R
|
||||
if (plan.maxRespawns !== undefined) setParam(settings, 'maxRespawns', integer(plan.maxRespawns));
|
||||
if (plan.selectedSlot) {
|
||||
setParam(settings, 'ctaInstantDecreaseTicketsWhenNoRespawn', flag(true));
|
||||
// The native mission loader reads the AI limit at the top level, after its bots.blk default.
|
||||
setParam(settings, 'numBotRespawns', integer(plan.airBotRespawns));
|
||||
}
|
||||
// MissionSettings::load (2.61.0.37 0x126b1f4..0x126b2e6) reads global config/bots.blk defaults
|
||||
// first, then overrides aircraft and tank AI respawn limits from the mission root, not customBots.
|
||||
setParam(settings, 'numBotRespawns', integer(plan.airBotRespawns));
|
||||
setParam(settings, 'numTankBotRespawns', integer(plan.tankBotRespawns));
|
||||
setParam(settings, 'useSpawnScore', flag(plan.useSpawnScore));
|
||||
setParam(settings, 'useTankBots', flag(plan.useTankBots));
|
||||
setParam(settings, 'useShipBots', flag(plan.useShipBots));
|
||||
|
||||
Reference in new issue
Block a user