Authentic target acquisition LIVE: reticle slew + pick-ray lock + aimed zone damage (task #36)
The engine Reticle model (MUNGA/RETICLE.h [T0]) reconstructed end to end: - Mech::targetReticle is a real Reticle member bound to the TargetReticle attribute (0x1d), per the RP VTV analog (VTV.h targetReticle). - Crosshair slew: mouse -> client rect -> reticle coords (the pod stick free-aim channel's dev-box stand-in); BT_AIM="x y" pins it headless. LMB fires lasers / RMB missiles (alongside SPACE/CTRL). - Pick ray: the ACTIVE eye publishes pos + LookAtRH basis (BTSetAimCamera, L4VIDRND view-write site) + the render loop publishes proj._22; BTGetAimRay builds the world ray, Mech::PickRayHit slab-tests it against the collision template's ExtentBox via the engine's BoundingBox::HitBy (local frame; clips the Line at entry) -> world hull point. - Designation: the mech under the crosshair designates (sticky; re-hover refreshes; cleared when the target leaves the roster at burial); the entity target slots 0x37c/0x388/0x38c feed the whole weapon path. - Aimed fire: while HOT the impact point is the PICKED hull point -> the STEP-6 cylinder lookup resolves the zone under the crosshair (verified: center-aim -> head-band zone 13 dominant). Off-crosshair the sticky designation converges on center mass. - HUD: the aim group draws at the slewed position ([0x9a] translate, contained by push/pop); the designator ring tracks the target's projected point (subB9 hot / subB8 designated, BTProjectToReticle); edge arrows when off-screen/behind. - AUTHENTIC gating: no fire arc exists in the binary (FireWeapon fires whenever HasActiveTarget, part_013.c:7758) -> BT_FIRE_ARC is now an explicit OPT-IN presentation clamp; the hardwired gEnemyMech lock and the projectile path's gEnemyMech fallback are removed. - Fixed en route: every renderable rebuild stomped mCamera back to the chase eye (start-inside silently lost the cockpit camera; the aim feed exposed it). BTL4VideoRenderer::mViewInside persists the chosen view. Verified headless: BT_AIM="0 0" -> HOT lock, pick hits the hull face at exact range, aimed zones resolve; BT_AIM="0.8 0.3" -> no lock, zero damage, zero missile launches; kill chain completes to wreck + smoke. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
6988821525
commit
d78bde066d
@@ -5575,7 +5575,33 @@ void
|
||||
// BOTH the cockpit and chase eyes; an unconditional write here let
|
||||
// whichever eye executed LAST stomp the toggled camera every frame.
|
||||
if (myRenderer->mCamera == this)
|
||||
{
|
||||
myDevice->SetTransform(D3DTS_VIEW, &view);
|
||||
|
||||
if (dbgEyeExec < 8)
|
||||
DEBUG_STREAM << "[EYE] ACTIVE eye " << (void *)this
|
||||
<< " (mCamera match) pos.y=" << pos.y << "\n" << std::flush;
|
||||
|
||||
// aim-ray feed (task #36): publish this eye's world pose --
|
||||
// the LookAtRH basis (zaxis = back, view direction = -zaxis)
|
||||
// -- for the reticle pick ray / designator projection.
|
||||
{
|
||||
extern void BTSetAimCamera(const float pos[3], const float xax[3],
|
||||
const float yax[3], const float zax[3]);
|
||||
D3DXVECTOR3 zax = pos - at;
|
||||
D3DXVec3Normalize(&zax, &zax);
|
||||
D3DXVECTOR3 xax;
|
||||
D3DXVec3Cross(&xax, &up, &zax);
|
||||
D3DXVec3Normalize(&xax, &xax);
|
||||
D3DXVECTOR3 yax;
|
||||
D3DXVec3Cross(&yax, &zax, &xax);
|
||||
const float p[3] = { pos.x, pos.y, pos.z };
|
||||
const float x3[3] = { xax.x, xax.y, xax.z };
|
||||
const float y3[3] = { yax.x, yax.y, yax.z };
|
||||
const float z3[3] = { zax.x, zax.y, zax.z };
|
||||
BTSetAimCamera(p, x3, y3, z3);
|
||||
}
|
||||
}
|
||||
myRenderer->GetMatrixStack()->Pop();
|
||||
}
|
||||
else if (dbgEyeExec < 8)
|
||||
|
||||
Reference in New Issue
Block a user