PARALLAX (#16): the pick/fire ray was anchored at mech.y+5.0 (a port improvisation) while the sight line ran from the eyepoint (y=6.23) -- two parallel rays whose constant offset grew into the reported low-miss as range closed (measured ry +0.072 @50u -> +1.54 @2.7u). The decomp's sight and pick share the eye origin (HudSimulation @4b7830 chain). Fix: the viewpoint mech's cockpit eye owns the aim-camera publish in BOTH views, origin = its own eye translation; leveling + deliberate elevation untouched; chase view now converges to cockpit ballistics (V cannot change where shots land). After: pick pinned to the crosshair (ry <= 5e-6) from 50u to point-blank; 26 laser + 8 missile center-mass hits at 3/4-screen. Awaiting the reporters' approach-test. VERDICT INSTRUMENTATION (#4 closed authentic, #5 verdict posted): BT_RANGE_LOG per-frame pick tracing + BTGroundRayHitExact analytic cross-check (0/8000 arena fall-throughs; cavern 6/8400 single-frame grazes -- the 'crazy sliding' is the authentic world-pick + 500 m/s slide over depth discontinuities); BT_AUD_TAIL StopNote/fade timing + BT_FIRE_PULSE single-shot driver (the energy 'buzz' is the AUTHORED charging loop: crescendo through recharge, 1.309s authored release, measured within one frame). CAVERN.EGG: solo cavern test egg. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d7158f1f82
commit
70eea6c1a4
@@ -17,6 +17,19 @@
|
||||
// per frame from AudioHead::Execute; a fade finishing (or being reclaimed by a
|
||||
// restart) stops + rewinds the source so the next SetupPatch sees AL_INITIAL.
|
||||
//
|
||||
|
||||
// [aud-tail] (Gitea #5 verdict harness, additive): BT_AUD_TAIL=1 gates
|
||||
// timestamped play/stop/fade tracing so the audible tail past beam-off can be
|
||||
// measured against the authored releaseSec. clock() is CRT wall-clock ms and
|
||||
// matches the [aud-tail] emitter state-transition logs (emitter.cpp).
|
||||
#include <ctime>
|
||||
static bool AudTailLog()
|
||||
{
|
||||
static int s_on = -1;
|
||||
if (s_on < 0) s_on = (getenv("BT_AUD_TAIL") != 0) ? 1 : 0;
|
||||
return s_on != 0;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct ReleaseFade
|
||||
@@ -32,6 +45,10 @@ namespace
|
||||
|
||||
void FinishFade(ReleaseFade &fade)
|
||||
{
|
||||
if (AudTailLog())
|
||||
DEBUG_STREAM << "[aud-tail] t=" << (long)clock() << "ms fade-END src="
|
||||
<< fade.source << " after " << fade.elapsed << "/" << fade.duration
|
||||
<< "s\n" << std::flush;
|
||||
alSourceStop(fade.source);
|
||||
alSourceRewind(fade.source);
|
||||
alSourcef(fade.source, AL_GAIN, fade.gain0);
|
||||
@@ -57,6 +74,10 @@ namespace
|
||||
fade.duration = duration;
|
||||
fade.elapsed = 0.0f;
|
||||
fade.active = true;
|
||||
if (AudTailLog())
|
||||
DEBUG_STREAM << "[aud-tail] t=" << (long)clock() << "ms fade-START src="
|
||||
<< source << " dur=" << duration << "s gain0=" << fade.gain0
|
||||
<< "\n" << std::flush;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -315,6 +336,15 @@ void PatchLevelOfDetail::PlayNote(SourceSet sourceSet, int note)
|
||||
{
|
||||
alSourcePlay(sourceSet.sources[i]);
|
||||
{ static int s_p=0; if (getenv("BT_AUDIO_LOG") && s_p++<30) DEBUG_STREAM << "[audio] PlayNote alSourcePlay src=" << sourceSet.sources[i] << " note=" << note << "\n" << std::flush; }
|
||||
if (AudTailLog())
|
||||
{
|
||||
SAMPLEINFO zinfo = PRESET_getSampleInfo(bankID, patchID, i);
|
||||
DEBUG_STREAM << "[aud-tail] t=" << (long)clock() << "ms PLAY src="
|
||||
<< sourceSet.sources[i] << " bank=" << (int)bankID << " patch="
|
||||
<< (int)patchID << " file=" << (zinfo.file ? zinfo.file : "?")
|
||||
<< " loop=" << (int)(zinfo.loop == LoopAtWill)
|
||||
<< " rel=" << zinfo.releaseSec << "s\n" << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
ALenum error = alGetError();
|
||||
@@ -340,6 +370,12 @@ void PatchLevelOfDetail::StopNote(SourceSet sourceSet)
|
||||
SAMPLEINFO info = PRESET_getSampleInfo(bankID,patchID,i);
|
||||
ALenum state;
|
||||
alGetSourcei(sourceSet.sources[i], AL_SOURCE_STATE, &state);
|
||||
if (AudTailLog() && state == AL_PLAYING)
|
||||
DEBUG_STREAM << "[aud-tail] t=" << (long)clock() << "ms STOP src="
|
||||
<< sourceSet.sources[i] << " bank=" << (int)bankID << " patch="
|
||||
<< (int)patchID << " file=" << (info.file ? info.file : "?")
|
||||
<< " rel=" << info.releaseSec << "s -> "
|
||||
<< ((info.releaseSec > 0.05f) ? "fade" : "cut") << "\n" << std::flush;
|
||||
if (state == AL_PLAYING && info.releaseSec > 0.05f)
|
||||
{
|
||||
StartReleaseFade(sourceSet.sources[i], info.releaseSec);
|
||||
|
||||
Reference in New Issue
Block a user