A Live Cam station is selected entirely by egg data - hostType=1 on that host's entry plus vehicle=camera - so no code path announces itself and a station that fails to come up leaves a log that simply stops. RP412CAMLOG=1 traces the sequence: the stand-alone host and its type, the local player node and game model, the interest-arena and interest-manager loads, the registry choosing a director, the director making its camera ship, and the launch handshake it waits on. Off by default. What it found immediately: a camera host wedges inside InterestManager::LoadMission - the map-entity load - and never returns. Everything upstream is correct (the egg parses, hostType 1 is adopted, gameModel reads 'camera'), and the same call with a racing egg passes straight through to making the player and launching. Same map both times, so it is the local host's TYPE that the map load cannot digest, not the map. That is a defect to fix before a lobby has anything to switch on. Also recorded while chasing it: a racing -egg run sits in application state 11 with the low-priority queue never empty for its whole life, and still simulates - so CheckLoad's no-console self-launch is not what starts a stand-alone race. Worth knowing before trusting that path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
193 lines
4.4 KiB
C++
193 lines
4.4 KiB
C++
#include "rp.h"
|
|
#pragma hdrstop
|
|
|
|
#include "rpreg.h"
|
|
#include "rpmssn.h"
|
|
#include "rpplayer.h"
|
|
#include "rpdirect.h"
|
|
#include "..\munga\app.h" // RPCameraLog
|
|
#include "crusher.h"
|
|
#include "runner.h"
|
|
#include "blocker.h"
|
|
#include "vtv.h"
|
|
#include "vtvpwr.h"
|
|
#include "booster.h"
|
|
#include "chute.h"
|
|
#include "scorzone.h"
|
|
#include "demopack.h"
|
|
#include "rivet.h"
|
|
#include "weapsys.h"
|
|
#include "..\munga\mission.h"
|
|
#include "..\munga\hostmgr.h"
|
|
#include "..\munga\app.h"
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Registry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
//
|
|
//#############################################################################
|
|
// Registry
|
|
//#############################################################################
|
|
//
|
|
RPRegistry::RPRegistry(ResourceFile *)
|
|
{
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// ~Registry
|
|
//#############################################################################
|
|
//
|
|
RPRegistry::~RPRegistry()
|
|
{
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// GetStaticData
|
|
//#############################################################################
|
|
//
|
|
Entity::SharedData*
|
|
RPRegistry::GetStaticData(ClassID class_ID)
|
|
{
|
|
switch (class_ID)
|
|
{
|
|
case VTVClassID:
|
|
return &VTV::DefaultData;
|
|
case ScoreZoneClassID:
|
|
return &ScoreZone::DefaultData;
|
|
case RivetClassID:
|
|
return &Rivet::DefaultData;
|
|
case DemolitionPackClassID:
|
|
return &DemolitionPack::DefaultData;
|
|
case RPPlayerClassID:
|
|
return &RPPlayer::DefaultData;
|
|
case CrusherClassID:
|
|
return &Crusher::DefaultData;
|
|
case BlockerClassID:
|
|
return &Blocker::DefaultData;
|
|
case RunnerClassID:
|
|
return &Runner::DefaultData;
|
|
default:
|
|
return Registry::GetStaticData(class_ID);
|
|
}
|
|
}
|
|
|
|
//
|
|
//#############################################################################
|
|
// GetStaticData
|
|
//#############################################################################
|
|
//
|
|
Player*
|
|
RPRegistry::MakePlayer(Mission *mission)
|
|
{
|
|
Check_Pointer(mission);
|
|
|
|
RPMission *rp_mission = Cast_Object(RPMission*, mission);
|
|
|
|
const char* player_name = rp_mission->GetPositionName();
|
|
|
|
int team_id = rp_mission->GetTeamID();
|
|
|
|
Logical score_compression;
|
|
score_compression = rp_mission->ScoreCompressionOn();
|
|
|
|
int player_bitmap_index = rp_mission->GetPlayerBitmapIndex();
|
|
|
|
if (strcmp(player_name, "runner") == 0)
|
|
{
|
|
Runner::MakeMessage
|
|
make_player(
|
|
Runner::MakeMessageID,
|
|
sizeof(Runner::MakeMessage),
|
|
RunnerClassID,
|
|
EntityID::Null,
|
|
ResourceDescription::NullResourceID,
|
|
Runner::DefaultFlags,
|
|
Origin::Identity,
|
|
player_bitmap_index,
|
|
RPPlayer::RunnerPlayerType,
|
|
team_id,
|
|
score_compression
|
|
);
|
|
return new Runner(&make_player);
|
|
}
|
|
|
|
else if (strcmp(player_name, "crusher") == 0)
|
|
{
|
|
Crusher::MakeMessage
|
|
make_player(
|
|
Crusher::MakeMessageID,
|
|
sizeof(Crusher::MakeMessage),
|
|
CrusherClassID,
|
|
EntityID::Null,
|
|
ResourceDescription::NullResourceID,
|
|
Crusher::DefaultFlags,
|
|
Origin::Identity,
|
|
player_bitmap_index,
|
|
RPPlayer::CrusherPlayerType,
|
|
team_id,
|
|
score_compression
|
|
);
|
|
return new Crusher(&make_player);
|
|
}
|
|
|
|
else if (strcmp(player_name, "blocker") == 0)
|
|
{
|
|
Blocker::MakeMessage
|
|
make_player(
|
|
Blocker::MakeMessageID,
|
|
sizeof(Blocker::MakeMessage),
|
|
BlockerClassID,
|
|
EntityID::Null,
|
|
ResourceDescription::NullResourceID,
|
|
Blocker::DefaultFlags,
|
|
Origin::Identity,
|
|
player_bitmap_index,
|
|
RPPlayer::BlockerPlayerType,
|
|
team_id,
|
|
score_compression
|
|
);
|
|
return new Blocker(&make_player);
|
|
}
|
|
|
|
else if (strcmp(mission->GetGameModel(), "camera"))
|
|
{
|
|
RPPlayer::MakeMessage
|
|
make_player(
|
|
RPPlayer::MakeMessageID,
|
|
sizeof(RPPlayer::MakeMessage),
|
|
RPPlayerClassID,
|
|
EntityID::Null,
|
|
ResourceDescription::NullResourceID,
|
|
RPPlayer::DefaultFlags,
|
|
Origin::Identity,
|
|
player_bitmap_index,
|
|
RPPlayer::GeneralPlayerType,
|
|
team_id,
|
|
score_compression
|
|
);
|
|
return new RPPlayer(&make_player);
|
|
}
|
|
|
|
else
|
|
{
|
|
if (RPCameraLog())
|
|
{
|
|
DEBUG_STREAM << "CamLog: registry making an RPCameraDirector (game model '"
|
|
<< mission->GetGameModel() << "')\n" << std::flush;
|
|
}
|
|
RPCameraDirector::MakeMessage create_director(
|
|
RPCameraDirector::MakeMessageID,
|
|
sizeof(RPCameraDirector::MakeMessage),
|
|
CameraDirectorClassID,
|
|
EntityID::Null,
|
|
ResourceDescription::NullResourceID,
|
|
RPCameraDirector::DefaultFlags,
|
|
Origin::Identity,
|
|
player_bitmap_index
|
|
);
|
|
return new RPCameraDirector(&create_director);
|
|
}
|
|
}
|
|
|