Mech phase 4: SetMappingSubsystem + MechControlsMapper ctor -- mech links as viewpoint
SetMappingSubsystem installs the control mapper into roster slot 0 (the streamed control-mapping binds DirectMappings to subsystemID 0). MechControlsMapper ctor constructs (per-frame InterpretControls deferred to phase 5). With RIO controls, MakeViewpointEntity now builds the MechRIOMapper, installs it, and gets PAST the controls check -- the mech constructs AND links as the viewpoint entity. Boot now advances into the mission-startup / control-binding path (next: a real NULL-deref there, deeper than the staged Fails). BT: 42 ok. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -301,7 +301,20 @@ Mech::~Mech()
|
||||
}
|
||||
|
||||
void
|
||||
Mech::SetMappingSubsystem(Subsystem *)
|
||||
Mech::SetMappingSubsystem(Subsystem *subsystem)
|
||||
{
|
||||
Fail("Mech::SetMappingSubsystem -- mech.cpp not yet reconstructed");
|
||||
Check(this);
|
||||
Check_Pointer(subsystemArray);
|
||||
|
||||
//
|
||||
// The control mapper lives in roster slot 0 (the streamed control-mapping
|
||||
// resource binds its DirectMappings to subsystemID 0, so it must resolve
|
||||
// there via Entity::GetSimulation(0)). On a re-spawn, drop the old one.
|
||||
//
|
||||
if (subsystemArray[0] != NULL)
|
||||
{
|
||||
Unregister_Object(subsystemArray[0]);
|
||||
delete subsystemArray[0];
|
||||
}
|
||||
subsystemArray[0] = subsystem;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,19 @@ MechControlsMapper::MechControlsMapper(
|
||||
shared_data
|
||||
)
|
||||
{
|
||||
Fail("MechControlsMapper -- mechmppr.cpp not yet reconstructed");
|
||||
Check(owner);
|
||||
//
|
||||
// The mapper is the Mech's active control Performance; per-frame control
|
||||
// interpretation (InterpretControls) is reconstructed with the mech2/3/4
|
||||
// simulation (phase 5). Prime the published control state to neutral.
|
||||
//
|
||||
{
|
||||
for (int i = 0; i < 64; ++i)
|
||||
{
|
||||
reserved[i] = 0;
|
||||
}
|
||||
}
|
||||
Check_Fpu();
|
||||
}
|
||||
|
||||
MechControlsMapper::~MechControlsMapper()
|
||||
|
||||
Reference in New Issue
Block a user