The nav display says what it can see
A Live Cam's map came up as furniture with nothing in it, and two confident explanations for that turned out to be wrong in a row - the cameraInit gauge page exists, and the gauge renderer IS linked to the camera ship, so both the page and its centre were fine all along. Two falsified guesses is the signal to measure instead, so RP412CAMLOG now traces the nav display: the scale and centre it resolves, the bounds it asks about, how many static and moving entities come back, and whether the sweep reaches the phase that actually draws. The ranking widget reports the players it can see with their rank and score, every five seconds so movement shows without flooding the log. It answered both questions on the first run, from a plain POD race: CamLog: nav scale 1000m across, 0.448 px/m, centre 12,416 CamLog: nav in bounds - 0 static, 0 moving CamLog: nav drew (phase 3 reached) A pod's nav map is as empty as a camera's. Sane scale, resolved centre, drawing phase reached, and nothing registered to draw - so this is not a Live Cam defect at all, it is a hole in whatever should be filling the gauge renderer's staticEntities and movingEntities, and it has been there for every station all along. A camera only made it obvious by having nothing else on the glass. The score, by contrast, tracks properly on a pod - 1000, 1005, 1148 across half a minute - so a camera host frozen at 1000 is genuinely camera shaped, and the ranking trace will say whether it sees the racer at all. Also here: a camera station's map defaults to the bottom-left corner rather than the pod's dead centre. Centre is where a cabinet wanted it and the worst place to put a panel on a picture. L4RADARPOS still overrides. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -3981,7 +3981,15 @@ static RadarPlacement
|
|||||||
{ "RIGHTCENTRE", RadarMidRight }
|
{ "RIGHTCENTRE", RadarMidRight }
|
||||||
};
|
};
|
||||||
|
|
||||||
cached = RadarBottomCenter;
|
//
|
||||||
|
// The pod had it dead centre under the viewscreen, so that is the
|
||||||
|
// default for a pod. A Live Cam is a shot, not a cockpit: dead
|
||||||
|
// centre is the worst place to put a panel on a picture, so a
|
||||||
|
// camera station defaults to the bottom-left corner instead.
|
||||||
|
// L4RADARPOS still overrides either way.
|
||||||
|
//
|
||||||
|
cached = Application::IsCameraStation()
|
||||||
|
? RadarBottomLeft : RadarBottomCenter;
|
||||||
|
|
||||||
const char *text = getenv("L4RADARPOS");
|
const char *text = getenv("L4RADARPOS");
|
||||||
if (text != NULL)
|
if (text != NULL)
|
||||||
|
|||||||
@@ -1557,6 +1557,21 @@ void
|
|||||||
DrawNames(worldToView);
|
DrawNames(worldToView);
|
||||||
localView.DetachRecorder();
|
localView.DetachRecorder();
|
||||||
|
|
||||||
|
//
|
||||||
|
// RP412CAMLOG: the sweep reached the drawing phase at all. If the
|
||||||
|
// counts above are non-zero and this never appears, the gauge
|
||||||
|
// slice is not getting this display as far as phase 3.
|
||||||
|
//
|
||||||
|
if (RPCameraLog())
|
||||||
|
{
|
||||||
|
static int drew = 0;
|
||||||
|
if (drew < 3)
|
||||||
|
{
|
||||||
|
++drew;
|
||||||
|
DEBUG_STREAM << "CamLog: nav drew (phase 3 reached)\n" << std::flush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// deliberately falls through into default case
|
// deliberately falls through into default case
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -1631,6 +1646,26 @@ void
|
|||||||
Test_Tell("x= " << xMin << "..." << xMax << "\n");
|
Test_Tell("x= " << xMin << "..." << xMax << "\n");
|
||||||
Test_Tell("y= " << yMin << "..." << yMax << "\n");
|
Test_Tell("y= " << yMin << "..." << yMax << "\n");
|
||||||
Test_Tell("z= " << zMin << "..." << zMax << "\n");
|
Test_Tell("z= " << zMin << "..." << zMax << "\n");
|
||||||
|
|
||||||
|
//
|
||||||
|
// RP412CAMLOG. Once, not per sweep - this runs at the gauge rate and
|
||||||
|
// would drown the log. Says whether the nav display has a sane centre
|
||||||
|
// and scale at all, which is the first question when the map comes up
|
||||||
|
// empty on a camera station.
|
||||||
|
//
|
||||||
|
if (RPCameraLog())
|
||||||
|
{
|
||||||
|
static int said = 0;
|
||||||
|
if (!said)
|
||||||
|
{
|
||||||
|
said = 1;
|
||||||
|
DEBUG_STREAM << "CamLog: nav scale " << currentScale
|
||||||
|
<< "m across, " << pixelsPerMeter << " px/m, centre "
|
||||||
|
<< viewing_position.x << "," << viewing_position.z
|
||||||
|
<< " bounds x " << xMin << ".." << xMax
|
||||||
|
<< " z " << zMin << ".." << zMax << "\n" << std::flush;
|
||||||
|
}
|
||||||
|
}
|
||||||
Check_Fpu();
|
Check_Fpu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1661,6 +1696,25 @@ void
|
|||||||
xMin, yMin, zMin,
|
xMin, yMin, zMin,
|
||||||
xMax, yMax, zMax
|
xMax, yMax, zMax
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// RP412CAMLOG. The counts are the whole question: furniture with no
|
||||||
|
// content means either nothing fell inside the bounds above, or the
|
||||||
|
// drawing steps are not being reached. Reported for the first few
|
||||||
|
// sweeps only - the lists are rebuilt at the gauge rate.
|
||||||
|
//
|
||||||
|
if (RPCameraLog())
|
||||||
|
{
|
||||||
|
static int sweeps = 0;
|
||||||
|
if (sweeps < 5)
|
||||||
|
{
|
||||||
|
++sweeps;
|
||||||
|
ChainIteratorOf<Entity*> statics(staticEntityList.GetInstanceList());
|
||||||
|
ChainIteratorOf<Entity*> movers(movingEntityList.GetInstanceList());
|
||||||
|
DEBUG_STREAM << "CamLog: nav in bounds - " << statics.GetSize()
|
||||||
|
<< " static, " << movers.GetSize() << " moving\n" << std::flush;
|
||||||
|
}
|
||||||
|
}
|
||||||
Check_Fpu();
|
Check_Fpu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2851,6 +2905,36 @@ void
|
|||||||
intercomEnabled = intercom->GetChannel() != Icom::undefinedChannel;
|
intercomEnabled = intercom->GetChannel() != Icom::undefinedChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// RP412CAMLOG. Says what the ranking widget can see: how many
|
||||||
|
// players are in the group and what rank and score each carries.
|
||||||
|
// A score that never moves is either not replicated to a camera
|
||||||
|
// host or simply has not changed - this tells the two apart. Every
|
||||||
|
// few seconds, not every sweep.
|
||||||
|
//
|
||||||
|
if (RPCameraLog())
|
||||||
|
{
|
||||||
|
static Scalar next_say = 0.0f;
|
||||||
|
if ((Scalar) Now() >= next_say)
|
||||||
|
{
|
||||||
|
next_say = ((Scalar) Now()) + 5.0f;
|
||||||
|
|
||||||
|
ChainIteratorOf<Node*> say(all_players->groupMembers);
|
||||||
|
Player *seen;
|
||||||
|
int shown = 0;
|
||||||
|
DEBUG_STREAM << "CamLog: ranking sees " << say.GetSize()
|
||||||
|
<< " player(s):";
|
||||||
|
while ((seen = (Player*) say.ReadAndNext()) != NULL && shown < 8)
|
||||||
|
{
|
||||||
|
++shown;
|
||||||
|
DEBUG_STREAM << " [bmp " << seen->playerBitmapIndex
|
||||||
|
<< " rank " << seen->playerRanking
|
||||||
|
<< " score " << (int) seen->currentScore << "]";
|
||||||
|
}
|
||||||
|
DEBUG_STREAM << " ourRank=" << currentRanking << "\n" << std::flush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
// Clear the current array
|
// Clear the current array
|
||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user