Camera seat LIVE + Mech::PlayerLinkMessageHandler reconstructed (@0049f624)
The spectator/broadcast seat works end-to-end: a hostType=1 +
vehicle=camera pilot page boots a CameraShip whose 62-camera arena1
network loads from the BTL4.RES type-27 resource (the engine's
CreateStreamedCameraInstances existed all along -- the file probe falls
back to it), the BTCameraDirector locks onto the first live mech, and
the ship TRACKS it (sees=1, goal advancing) and CUTS between authored
camera positions (screenshot-verified: wide arena shot -> close
tracking shot).
The missing piece was the Mech override of PlayerLinkMessageHandler
(@0049f624), which the reconstruction never filled. The engine base
resolves mech->player; BT's override adds:
1. the REVERSE link player->playerVehicle = this on EVERY node
(replicants included) -- how the camera director and scoreboard
find a REMOTE player's mech; without it a spectator parks forever
('NO goal entity')
2. clears NonScoringPlayerFlag (0x4000 = bit 14): a pilot with a
vehicle is a SCORING player -- this admits REPLICATED players to
the ranking pass, so cross-node rank/score displays work
3. master only: seeds the heat bank's ambientTemperature (bank
@0x1d4) from the mission [mission] temperature= (BTMission+0xf4)
-- correcting the heat family's 'frozen 300' deviation note (it
was never frozen; THIS is the writer)
Bridge BTSetBankAmbientTemperature lives in heatfamily_reslice.cpp
(mech.cpp cannot include subsystem headers -- local-stub collision).
BT_CAM_LOG diagnostics: camera-network count, director pick + Players
group census, ship follow state, link dispatch/receive.
Verified live: 2-seat (mech + camera) relay session -- replicated
player shows +veh, director goal locked w/ 30s timer, ship tracking a
moving mech through camera cuts; standard 2-node mech smoke PASS
(un-regressed). Lesson re-learned: a 'clean' build filtered on 'error
C' missed a linker file-lock failure -- one whole test cycle ran
against a stale exe (the /FORCE gotcha's cousin; grep -i error, not
error C).
Remaining (task open): ranking-window overlay draw (L4VIDRND stubs),
operator-app camera-seat row, shot polish.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
74d9d3b6ff
commit
4459262b9c
@@ -80,6 +80,12 @@
|
||||
// for the same reason.
|
||||
#include "dmgtable.hpp"
|
||||
extern Scalar BTGetTorsoTwist(Subsystem *torso); // torso.cpp (Torso complete there)
|
||||
// heat-bank ambient bridge (heatfamily_reslice.cpp, AggregateHeatSink complete
|
||||
// there) -- mech.cpp cannot include the subsystem headers (local-stub collision)
|
||||
extern void BTSetBankAmbientTemperature(Subsystem *bank, Scalar temperature);
|
||||
#if !defined(BTMSSN_HPP)
|
||||
# include <btmssn.hpp> // BTMission::GetMissionTemperature (PlayerLink)
|
||||
#endif
|
||||
#if !defined(APP_HPP)
|
||||
# include <app.hpp>
|
||||
#endif
|
||||
@@ -454,6 +460,7 @@ const Receiver::HandlerEntry
|
||||
Mech::MessageHandlerEntries[] =
|
||||
{
|
||||
MESSAGE_ENTRY(Mech, TakeDamage),
|
||||
MESSAGE_ENTRY(Mech, PlayerLink),
|
||||
};
|
||||
|
||||
Receiver::MessageHandlerSet
|
||||
@@ -609,6 +616,52 @@ Scalar
|
||||
return tmpl ? tmpl->maxY : 0.0f; // ResolveHit guards <= 0
|
||||
}
|
||||
|
||||
//
|
||||
// Mech override of Entity::PlayerLinkMessageHandler (binary @0049f624). The
|
||||
// engine base resolves the FORWARD link (mech->playerLink @0x190 from the
|
||||
// message's playerID); BT then:
|
||||
// 1. sets the REVERSE link player->playerVehicle = this -- on EVERY node,
|
||||
// replicants included. This is how the 1995 camera director
|
||||
// (BeABTDirector's GetPlayerByIndex -> GetPlayerVehicle) and the
|
||||
// scoreboard find a REMOTE player's mech; without it a spectator seat
|
||||
// parks forever ("no goal entity", camera-seat bring-up 2026-07-18).
|
||||
// 2. clears the player's NonScoringPlayerFlag (0x4000 == bit 14): a pilot
|
||||
// with a vehicle is a SCORING player -- this is what admits them to the
|
||||
// ranking pass (Player::IsScoringPlayer gates RankPlayers).
|
||||
// 3. master only: seeds the heat bank's ambientTemperature (@0x1d4 on the
|
||||
// 0xBBE AggregateHeatSink at mech+0x7dc) from the mission's [mission]
|
||||
// temperature (BTMission+0xf4) -- resolving the heat family's
|
||||
// "frozen 300" deviation note: it was never frozen, THIS writes it.
|
||||
//
|
||||
void
|
||||
Mech::PlayerLinkMessageHandler(PlayerLinkMessage *message)
|
||||
{
|
||||
Check(message);
|
||||
Entity::PlayerLinkMessageHandler(message); // FUN_0041fd18: mech+0x190
|
||||
|
||||
Player *owner = GetPlayerLink();
|
||||
if (getenv("BT_CAM_LOG"))
|
||||
DEBUG_STREAM << "[cam] Mech::PlayerLink inst="
|
||||
<< (int)(GetInstance() == ReplicantInstance)
|
||||
<< " owner=" << (void*)owner << "\n" << std::flush;
|
||||
if (owner != NULL)
|
||||
{
|
||||
owner->SetPlayerVehicle(this); // player+0x1fc = this
|
||||
owner->simulationFlags &= ~Player::NonScoringPlayerFlag; // &= ~0x4000
|
||||
|
||||
if (GetInstance() != ReplicantInstance && sensorSubsystem != NULL)
|
||||
{
|
||||
Mission *mission = owner->GetMission();
|
||||
if (mission != NULL)
|
||||
{
|
||||
BTSetBankAmbientTemperature(sensorSubsystem,
|
||||
((BTMission *)mission)->GetMissionTemperature());
|
||||
}
|
||||
}
|
||||
}
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
//
|
||||
// Mech override of Entity::TakeDamageMessageHandler (binary @0x4a037a, the two
|
||||
// call sites into the glue @0x49ed0c). An unaimed hit arrives with
|
||||
|
||||
Reference in New Issue
Block a user