Score replication: peers' scores now reach every pod (rank fix)
Field report (playtest night, voice channel): everyone's HUD showed them in 1st place. Root cause: the engine's score-replication machinery was complete -- Player::WriteUpdateRecord ships currentScore, the replicant ReadUpdateRecord applies it, CalcRanking sums every scoring player -- but nothing marked the player's update record dirty on a score change (the engine only ForceUpdates at mission end for the fade sync). Every peer's replicant player therefore stayed at score 0 and each machine ranked its own (only-nonzero) player first. Fix: ForceUpdate() after every score application in the BTPlayer handlers (main, inflicted, and the severed-vehicle branch) -- the existing update-record path does the rest. Verified 2-node (force-damage kill scoring): the victim's machine ranks the killer's REPLICANT at its replicated score (24) above its own master (0); standings consistent on both nodes. BT_RANK_LOG=1 kept as the 1 Hz per-player ranking dump. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c8cba8c764
commit
12a1fea823
@@ -528,6 +528,7 @@ void
|
||||
//
|
||||
currentScore +=
|
||||
(MECH_TONNAGE(target_mech) / MECH_TONNAGE(our_mech)) * award; // (+0x4bc / +0x4bc), this+0x278
|
||||
ForceUpdate(); // replicate the score (rank fix)
|
||||
|
||||
// MP MATCH FORENSICS (matchlog.hpp): inflicted-damage score (type=0),
|
||||
// logged with the post-accumulate total.
|
||||
@@ -741,9 +742,18 @@ void
|
||||
if (playerVehicle == 0)
|
||||
{
|
||||
currentScore += message->scoreAward; // the base's award apply
|
||||
ForceUpdate(); // replicate the score (rank fix)
|
||||
return;
|
||||
}
|
||||
Player::ScoreMessageHandler(message); // FUN_0042da20
|
||||
|
||||
// SCORE REPLICATION (2026-07-23, the "everyone sees themselves 1st"
|
||||
// field report): Player::WriteUpdateRecord SHIPS currentScore and the
|
||||
// replicant's ReadUpdateRecord APPLIES it -- but nothing ever marked the
|
||||
// player's record dirty on a score change (the engine only ForceUpdates
|
||||
// at mission end), so every peer's replicant player stayed at 0 and
|
||||
// CalcRanking put the local player first on every machine.
|
||||
ForceUpdate();
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user