Implement evidence-backed VR02 Rocketship flight and ownership

This commit is contained in:
UnixNight committed 2026-11-03 16:42:09 -05:00
1 parent 312efccb77
commit e77add5fdf
50 files changed
+4326 -66

No files matched your search

+74 -17
View File
@@ -89,6 +89,7 @@ internal static class Program
--smoke-shrink-ray Fire at an actual VR04 soldier; explicit player-placement fixture
--smoke-invisible Accelerated recharge/activation/flash/expiry/unequip fixture in VR03
--smoke-baseball VR07 aim/release/flight/target/respawn fixture
--smoke-rocketship VR02 flight/turn/roll/control fixture
--smoke-bubble VR01 expand/throttle/bounce/cleanup/fade input fixture
--gadget-menu Render original gadget panel (--skip-intro); fixture owns item3
--smoke-gadget-menu SDL menu input/pause/selection/practice/Return check (24 frames)
@@ -262,6 +263,7 @@ internal static class Program
var invisibleSmoke = args.Contains("--smoke-invisible");
var bubbleSmoke = args.Contains("--smoke-bubble");
var baseballSmoke = args.Contains("--smoke-baseball");
var rocketSmoke = args.Contains("--smoke-rocketship");
var carlSmoke = args.Contains("--smoke-carl-cutscene");
var controlPhaseSmoke = args.Contains("--smoke-control-phases");
var objectiveWindowSmoke = args.Contains("--smoke-objective-window");
@@ -282,7 +284,7 @@ internal static class Program
var defaultStory = (defaultScene || args.Contains("--walk")) && !args.Contains("--inspect") && !walkSmoke && !args.Contains("--smoke-window")
&& animationPath == null && !args.Contains("--time");
var story = defaultStory || loadedSave != null || saveOutput != null || args.Contains("--story") || args.Contains("--story-time")
|| args.Contains("--skip-intro") || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || gadgetWindowSmoke || practiceWindowSmoke || practiceReturnSmoke || carlSmoke || controlPhaseSmoke || objectiveSmoke;
|| args.Contains("--skip-intro") || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || rocketSmoke || gadgetWindowSmoke || practiceWindowSmoke || practiceReturnSmoke || carlSmoke || controlPhaseSmoke || objectiveSmoke;
if (story && (args.Contains("--inspect") || walkSmoke || args.Contains("--smoke-window")))
throw new ArgumentException("Story playback requires its own simulation mode.");
if (walkSmoke && args.Contains("--inspect")) throw new ArgumentException("Walk smoke cannot run in inspection mode.");
@@ -315,6 +317,8 @@ internal static class Program
SceneBaseballs? baseballs = null;
BaseballVisuals? baseballVisuals = null;
BaseballAimOverlay? baseballAim = null;
Rocketship? rocketship = null;
RocketshipVisuals? rocketshipVisuals = null;
var practice = new PracticePrompt();
ObjectivePanel? objectivePanel = null;
var patrols = new Dictionary<string, ActorPatrol>(StringComparer.OrdinalIgnoreCase);
@@ -343,13 +347,13 @@ internal static class Program
var standingPose = AseMesh.Load(AssetPath.Resolve(root, "ASE/jimstop.ase"));
if (walking)
{
var cameraRay = level!.Code is "LV1B" or "VR01" or "VR04" or "VR07" or "LEV1"
var cameraRay = level!.Code is "LV1B" or "VR01" or "VR02" or "VR04" or "VR07" or "LEV1"
? OriginalCameraRay.FromRouteScene(world, level.Code) : null;
debugCameraRay = cameraRay;
simulation = new LabSimulation(new SceneCollision(world), standingPose, originalStart.Position, originalStart.Rotation.Y,
cameraRay == null ? null : (look, eye) => cameraRay.Trace(look, eye),
cameraRay == null ? null : (start, end) => cameraRay.TraceGeometry(start, end),
level.Code is "VR01" or "VR04" or "VR07" ? OriginalStaticCollision.FromRouteScene(world,level.Code) : null, energy)
level.Code is "VR01" or "VR02" or "VR04" or "VR07" ? OriginalStaticCollision.FromRouteScene(world,level.Code) : null, energy)
{ LevelCode = level.Code, InputAfterPlayerUpdate = carriedSave != null };
if (carriedPlayer != null)
{
@@ -389,6 +393,7 @@ internal static class Program
simulation!.Energy = interactions.Energy;
simulation.JetpackInventoryState = () => interactions.Inventory.State(0, 3);
simulation.ScoreChanged += interactions.ChangeScore;
if(level.Code=="VR02")rocketship=new(director.Actors.Single(a=>a.Kind=="3ROC"),world,level.Code);
if (level.Code is "LV1B" or "VR04" or "LEV1")
{
gadgets = new SceneGadgets(director,interactions.Inventory,simulation,world);
@@ -457,6 +462,11 @@ internal static class Program
mesh = bubbleVisuals.Mesh;
baseballVisuals = new(mesh,Path.GetFullPath(Path.Combine(Path.GetDirectoryName(scene!)!,"..")));
mesh = baseballVisuals.Mesh;
if(rocketship!=null)
{
rocketshipVisuals=new(mesh,Path.GetFullPath(Path.Combine(Path.GetDirectoryName(scene!)!,"..")));
mesh=rocketshipVisuals.Mesh;
}
if (gadgets != null)
{
rayVisuals = new ShrinkRayVisuals(mesh,Path.GetFullPath(Path.Combine(Path.GetDirectoryName(scene!)!, "..")),root);
@@ -500,7 +510,7 @@ internal static class Program
var storyTime = double.Parse(Option(args, "--story-time") ?? "0", System.Globalization.CultureInfo.InvariantCulture);
if (!double.IsFinite(storyTime) || storyTime < 0 || storyTime > 3600 || storyTime > 0 && !headless)
throw new ArgumentException("Story time must be0..3600 seconds in headless mode.");
var frames = int.Parse(Option(args, "--frames") ?? (walkSmoke ? "240" : jetpackSmoke ? "300" : shrinkSmoke ? "90" : invisibleSmoke || bubbleSmoke || baseballSmoke ? "8" : gadgetWindowSmoke ? "24" : objectiveWindowSmoke ? "180" : carlSmoke ? "60" : controlPhaseSmoke ? "32" : toolsSmoke ? "20" : debugSmoke ? "16" : diagnosticsSmoke ? "24" : headless ? "1" : "0"));
var frames = int.Parse(Option(args, "--frames") ?? (rocketSmoke ? "10" : walkSmoke ? "240" : jetpackSmoke ? "300" : shrinkSmoke ? "90" : invisibleSmoke || bubbleSmoke || baseballSmoke || rocketSmoke ? "8" : gadgetWindowSmoke ? "24" : objectiveWindowSmoke ? "180" : carlSmoke ? "60" : controlPhaseSmoke ? "32" : toolsSmoke ? "20" : debugSmoke ? "16" : diagnosticsSmoke ? "24" : headless ? "1" : "0"));
if (gadgetWindowSmoke && (headless || level?.Code != "LV1B" || loadedSave != null || frames < 24))
throw new ArgumentException("Gadget menu SDL fixture requires a fresh windowed lab and24 frames");
if (shrinkSmoke && (level?.Code != "VR04" || gadgets == null || frames < 60))
@@ -511,6 +521,8 @@ internal static class Program
throw new ArgumentException("Bubble smoke requires a fresh VR01 and at least8 frames");
if(baseballSmoke && (level?.Code!="VR07" || frames<8 || loadedSave!=null))
throw new ArgumentException("Baseball fixture requires a fresh VR07 and at least8 frames");
if(rocketSmoke&&(level?.Code!="VR02"||frames<10||loadedSave!=null))
throw new ArgumentException("Rocketship fixture requires fresh VR02 and at least10 frames");
if (controlPhaseSmoke && (level?.Code != "LV1B" || loadedSave != null || frames < 32 || director == null))
throw new ArgumentException("Control-phase fixture needs a fresh lab and at least32 frames");
if (toolsSmoke && (headless || frames < 16 || director == null || level?.Code != "LV1B" || loadedSave != null || debugMenu.Open))
@@ -535,7 +547,7 @@ internal static class Program
var height = uint.Parse(Option(args, "--height") ?? "720");
if (width is < 64 or > 8192 || height is < 64 or > 8192) throw new ArgumentException("Viewport dimensions must be64..8192");
using var playerBinding = director == null ? null
: new PlayerSceneBinding(director, simulation!, interactions!.Inventory, level!.Player!.Tag!);
: new PlayerSceneBinding(director, simulation!, interactions!.Inventory, level!.Player!.Tag!,rocketship);
var renderer = presentation.LoadScene(mesh, texture, headless,
walking ? WalkTitle : animations?.WindowTitle ?? "Jimmy Neutron — scene preview | C camera",
width, height, !args.Contains("--no-validation"));
@@ -546,6 +558,8 @@ internal static class Program
InvisibleSmoke? invisibleFixture = null;
BubbleSmoke? bubbleFixture = null;
BaseballSmoke? baseballFixture = null;
RocketshipSmoke? rocketFixture=null;
var sawRocketKeys=0;
var sawBaseballKeys=0;
var sawBubbleKeys=0;
Console.WriteLine($"Scene presentation: revision={renderer.SceneRevision}, windows={presentation.WindowCreationCount}, renderers={presentation.RendererCreationCount}, window ID={(window == 0 ? 0 : Sdl.SDL_GetWindowID(window))}, size={renderer.Width}x{renderer.Height}.");
@@ -560,6 +574,12 @@ internal static class Program
simulation.BubbleSoundStopped += () => sceneAudio?.StopLoop("bubble");
}
if(baseballs!=null)baseballs.Sound+=id=>sceneAudio?.Effect(id);
if(rocketship!=null)
{
rocketship.Sound+=id=>sceneAudio?.Effect(id);
rocketship.EngineSound+=id=>sceneAudio?.Effect(id,"rocket-engine");
rocketship.EngineStopped+=()=>sceneAudio?.StopLoop("rocket-engine");
}
if (gadgets != null)
{
gadgets.Sound += (id,loop) => sceneAudio?.Effect(id,loop ? "shrink-ray" : null);
@@ -603,7 +623,7 @@ internal static class Program
Console.WriteLine($"Practice RETURN: exact saved root={restored}, root={simulation.ActorRoot}, STRT yaw={simulation.Yaw}, intro suppressed={!director.Playing}, companion restored={companionRestored}, retained player input order={simulation.InputAfterPlayerUpdate}, gadget availability={interactions.Inventory.State(0, 3)}.");
if (!restored) throw new InvalidOperationException("RETURN did not restore the live departure root without replaying STRT actions");
}
if (args.Contains("--skip-intro") || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || gadgetWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke || controlPhaseSmoke) { sceneAudio?.StopSpeech(); director.Skip(); }
if (args.Contains("--skip-intro") || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || rocketSmoke || gadgetWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke || controlPhaseSmoke) { sceneAudio?.StopSpeech(); director.Skip(); }
if (gadgetWindowSmoke) { interactions!.Inventory.SetState(0,3,1); interactions.Inventory.SelectGadget(3); }
if (controlPhaseSmoke)
{
@@ -685,6 +705,7 @@ internal static class Program
}
if (invisibleSmoke) invisibleFixture = new(simulation!,interactions!.Inventory);
if(baseballSmoke)baseballFixture=new(simulation!,playerBinding!,interactions!.Inventory,baseballs!,director);
if(rocketSmoke)rocketFixture=new(simulation!,playerBinding!,director,interactions!);
if (bubbleSmoke) bubbleFixture = new(simulation!,interactions!.Inventory);
if (shrinkSmoke)
{
@@ -776,7 +797,8 @@ internal static class Program
gadgetScreen?.Close();
if (simulation == null) { debugMenu.Message = "RESET REQUIRES PLAY MODE"; return; }
if (practice.Active) practice.Key(17, Vector2.Zero);
simulation.Reset(); poseTime = 0; sceneAudio?.StopSpeech(); director?.Begin(originalStart!);
playerBinding?.ResetVehicle();simulation.Reset(); poseTime = 0; sceneAudio?.StopSpeech(); director?.Begin(originalStart!);
rocketship?.Reset();
interactions?.Reset(); mechanisms?.Reset(); gadgets?.Reset(); baseballs?.Reset(); mouseFire = false;
director?.SyncActor(level!.Player!.Tag!, simulation.ActorRoot, new Vector3(0, simulation.Yaw, 0));
}
@@ -804,7 +826,7 @@ internal static class Program
case DebugAction.Resume: debugMenu.Close(); break;
case DebugAction.Camera: ToggleCamera(); debugMenu.Close(); break;
case DebugAction.SkipCutscene:
if (director is { Playing: true } or { Blocked: true } or { Controlled: false })
if (director is { Playing: true } or { Blocked: true }||director is{Controlled:false}&&rocketship?.Mounted!=true)
{ sceneAudio?.StopSpeech(); director.Skip(); debugMenu.Message = "CUTSCENE SKIPPED"; }
else debugMenu.Message = "NO ACTIVE CUTSCENE";
break;
@@ -872,6 +894,11 @@ internal static class Program
for (var item = 0; item < 8; item++) interactions.Inventory.SetState(0,item,1);
debugMenu.Message = "ALL 8 GADGETS GIVEN - TAB/SPACE OPENS GADGETS DURING PLAY";
break;
case DebugAction.GiveRocketship when interactions != null:
interactions.Inventory.SetState(0,1,1);interactions.Inventory.SelectGadget(1);
debugMenu.Message=rocketship?.Mounted==true?"ROCKETSHIP EQUIPPED - ARROWS FLY, ENTER/T TURN, R ROLL":
"ROCKETSHIP GIVEN - SELECT ITS PRACTICE TILE TO FLY IN VR02";
break;
case DebugAction.CameraObstruction when debugCameraRay != null:
debugCameraRay.Enabled = !debugCameraRay.Enabled; debugMenu.Message = "STATIC CAMERA QUERY TOGGLED"; break;
case DebugAction.MuteMusic or DebugAction.MuteSpeech or DebugAction.MuteEffects when sceneAudio != null:
@@ -937,6 +964,11 @@ internal static class Program
}
while (running)
{
rocketFixture?.BeforeFrame(count,(key,down)=>
{
var e=new Sdl.Event{Type=down?Sdl.KeyDown:Sdl.KeyUp,Scancode=key,Down=down?(byte)1:(byte)0};
if(!Sdl.SDL_PushEvent(ref e))throw new InvalidOperationException(Sdl.Error);
},headless);
baseballFixture?.BeforeFrame(count,(key,down)=>
{
var e=new Sdl.Event{Type=down?Sdl.KeyDown:Sdl.KeyUp,Scancode=key,Down=down?(byte)1:(byte)0};
@@ -998,6 +1030,8 @@ internal static class Program
}
while (!headless && Sdl.SDL_PollEvent(out var e))
{
if(rocketSmoke&&e.Type==Sdl.KeyDown)
sawRocketKeys|=e.Scancode switch{82=>1,80=>2,40=>4,21=>8,43=>16,60=>32,_=>0};
if(baseballSmoke && e.Type==Sdl.KeyDown)
sawBaseballKeys|=e.Scancode switch{224=>1,80=>2,82=>4,43=>8,_=>0};
if (bubbleSmoke && e.Type==Sdl.KeyDown)
@@ -1049,11 +1083,11 @@ internal static class Program
}
if (e.Type == Sdl.KeyDown && e.Scancode is 43 or 44
&& !inspecting && simulation?.Noclip != true && !practice.Active && gadgetScreen != null
&& (gadgetScreen.Open || director is { Controlled: true, InventoryEnabled: true }))
&& (gadgetScreen.Open || playerBinding?.InventoryControlled==true))
{
var first = gadgetHeldKeys.Count == 0;
gadgetHeldKeys.Add(e.Scancode);
if (first && e.Repeat == 0) gadgetScreen.Toggle(director is { Controlled: true, InventoryEnabled: true });
if (first && e.Repeat == 0) gadgetScreen.Toggle(playerBinding?.InventoryControlled==true);
debugCapturedKeys.UnionWith(keys);
keys.Clear(); mouseJump = mouseFire = false; stepClock.Reset(); continue;
}
@@ -1083,7 +1117,7 @@ internal static class Program
if (walkSmoke) sawWalkKeys |= e.Scancode == 82 ? 1 : e.Scancode == 79 ? 2 : e.Scancode == jumpScancode ? 4 : 0;
if (jetpackSmoke) sawJetpackKeys |= e.Scancode == 82 ? 1 : e.Scancode == 81 ? 2 : e.Scancode == 80 ? 4 : e.Scancode == jumpScancode ? 8 : 0;
if (smoke && e.Scancode == 79) sawKey = true;
if (e.Scancode is 41 or 44 && e.Repeat == 0 && director is { Controlled: false }
if (e.Scancode is 41 or 44 && e.Repeat == 0 && director is { Controlled: false }&&rocketship?.Mounted!=true
&& (e.Scancode != 44 || simulation?.Noclip != true))
{ sceneAudio?.StopSpeech(); director.Skip(); keys.Clear(); mouseJump = false; }
else if (e.Scancode == 41) running = false;
@@ -1097,7 +1131,7 @@ internal static class Program
{
ToggleCamera(); keys.Clear(); mouseJump = false; stepClock.Reset();
}
if (!inspecting && e.Scancode == 21 && e.Repeat == 0)
if (!inspecting && e.Scancode == 21 && e.Repeat == 0 && rocketship?.Mounted!=true)
{
ResetScene();
}
@@ -1126,12 +1160,13 @@ internal static class Program
}
}
if (debugMenu.Open) animationStarted += elapsed;
if (simulation != null && !debugMenu.Open && !inspecting && !practice.Active && gadgetScreen?.Open != true && (active || headless || walkSmoke || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || gadgetWindowSmoke || objectiveWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke))
if (simulation != null && !debugMenu.Open && !inspecting && !practice.Active && gadgetScreen?.Open != true && (active || headless || walkSmoke || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || rocketSmoke || gadgetWindowSmoke || objectiveWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke))
{
var steps = headless || walkSmoke || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || gadgetWindowSmoke || practiceWindowSmoke || carlSmoke || controlPhaseSmoke || objectiveWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke ? 1 : stepClock.Advance(elapsed);
var steps = headless || walkSmoke || jetpackSmoke || shrinkSmoke || invisibleSmoke || bubbleSmoke || baseballSmoke || rocketSmoke || gadgetWindowSmoke || practiceWindowSmoke || carlSmoke || controlPhaseSmoke || objectiveWindowSmoke || debugSmoke || diagnosticsSmoke || toolsSmoke ? 1 : stepClock.Advance(elapsed);
for (var step = 0; step < steps; step++)
{
var input = carlSmoke || controlPhaseSmoke ? new PlayerInput(true, false, true, false, true)
: rocketSmoke && headless ? RocketshipSmoke.Input(count)
: baseballSmoke && headless ? BaseballSmoke.Input(count)
: bubbleSmoke && headless ? BubbleSmoke.Input(count)
: invisibleSmoke && headless ? new PlayerInput(false,false,false,false,false,Fire:count==1)
@@ -1142,7 +1177,8 @@ internal static class Program
mouseJump || keys.Contains(225) || keys.Contains(229) || keys.Contains(73) || keys.Contains(98),
keys.Contains(44) || keys.Contains(8), keys.Contains(224) || keys.Contains(228) || keys.Contains(20),
keys.Contains(4), keys.Contains(7), keys.Contains(225) || keys.Contains(229),
mouseFire || keys.Contains(40) || keys.Contains(88) || keys.Contains(224) || keys.Contains(228));
mouseFire || keys.Contains(40) || keys.Contains(88) || keys.Contains(224) || keys.Contains(228),
RocketTurn:keys.Contains(40)||keys.Contains(88)||keys.Contains(23),RocketRoll:keys.Contains(21),RocketMouseRise:mouseJump);
gadgets?.StepBodies(FixedStepClock.Step);
baseballs?.StepBodies(FixedStepClock.Step);
var before = simulation.Position;
@@ -1150,6 +1186,7 @@ internal static class Program
bool acceptsInput;
if (playerBinding != null) acceptsInput = playerBinding.Step(input);
else { simulation.Step(input); acceptsInput = true; }
rocketFixture?.Received(input);
gadgets?.StepTimers(FixedStepClock.Step);
baseballs?.StepTargets(FixedStepClock.Step);
if (jetpackSmoke && powered)
@@ -1163,7 +1200,7 @@ internal static class Program
if (!simulation.Noclip)
{
director?.Touch(level!.Player!.Tag!, simulation.ActorRoot);
interactions?.Update(simulation.ActorRoot, simulation.InteractionRadius);
interactions?.Update(simulation.ActorRoot, simulation.InteractionRadius,rocketship is{Mounted:true}?rocketship.Actor:null);
}
if (practice.Active) { keys.Clear(); mouseJump = false; stepClock.Reset(); break; }
if (!simulation.Noclip) mechanisms?.Update(simulation.ActorRoot, simulation.InteractionRadius);
@@ -1206,6 +1243,11 @@ internal static class Program
view = Matrix4x4.CreateLookAtLeftHanded(simulation.CameraEye, simulation.CameraTarget, Vector3.UnitY);
renderEye = simulation.CameraEye; renderTarget = simulation.CameraTarget;
}
if(!inspecting&&rocketship is{Mounted:true})
{
renderEye=rocketship.CameraEye;renderTarget=rocketship.CameraTarget;
view=Matrix4x4.CreateLookAtLeftHanded(renderEye,renderTarget,Vector3.UnitY);
}
if (!inspecting && simulation?.Noclip != true && director?.CameraEye is { } storyEye && director.CameraTarget is { } storyTarget)
{
view = Matrix4x4.CreateLookAtLeftHanded(storyEye, storyTarget, Vector3.UnitY);
@@ -1220,6 +1262,7 @@ internal static class Program
bubbleVisuals?.Update(mesh,simulation!.Bubble,simulation.BubbleRoot,renderEye,renderTarget);
baseballVisuals?.Update(mesh,simulation!.Baseball.Projectiles,renderEye,renderTarget);
baseballAim?.Update(mesh,simulation!.Baseball,renderer.Width,renderer.Height);
if(rocketship!=null)rocketshipVisuals?.Update(mesh,rocketship,rocketship.FrameSteps/60d,simulation!.Appearance);
spriteVisuals?.FaceCamera(renderEye, renderTarget, mesh);
objectivePanel?.Key(keys.Contains(18) && !debugMenu.Open && !inspecting && !practice.Active && gadgetScreen?.Open != true
&& director is { Controlled: true, InventoryEnabled: true });
@@ -1234,7 +1277,7 @@ internal static class Program
}
var gameplayProjection = originalCamera || simulation != null && !inspecting;
var cameraMode = simulation?.Noclip == true && !inspecting ? "NOCLIP" : !inspecting && director?.CameraEye != null ? "CUTSCENE"
: simulation != null && !inspecting ? "GAMEPLAY" : originalCamera ? "STRT" : "ORBIT";
: rocketship?.Mounted==true&&!inspecting?"ROCKETSHIP":simulation != null && !inspecting ? "GAMEPLAY" : originalCamera ? "STRT" : "ORBIT";
var debugStatus = new DebugStatus(level?.Code ?? "PREVIEW", originalStart?.Tag ?? "NONE",
simulation?.ActorRoot ?? Vector3.Zero, simulation?.Yaw ?? 0, simulation?.Speed ?? 0,
simulation?.Grounded ?? false, simulation?.Energy ?? 0, interactions?.Score ?? 0,
@@ -1253,6 +1296,7 @@ internal static class Program
BubblePhase = simulation?.Bubble.Active==true ? "ACTIVE" : simulation?.Bubble.Expanding==true ? "EXPAND"
: simulation?.Bubble.Collapsing==true ? "FADE" : "OFF",
BaseballState=simulation==null?"OFF":$"{(simulation.Baseball.Equipped?"ON":"OFF")} AIM {simulation.Baseball.SavedPitch:F1} PENDING {simulation.Baseball.PendingThrow} THROWS {simulation.Baseball.Throws}",
RocketshipState=rocketship==null?null:$"{(rocketship.Mounted?"ON":"OFF")} SPEED {rocketship.Steering.Speed:F1} VY {rocketship.Velocity.Y:F1} HIT {rocketship.Contacts}",
BodyRadius = simulation?.InteractionRadius ?? 60, BodyFactor=simulation?.BodyFactor ?? 1.265f,
Objective = interactions?.CurrentObjective ?? 0, ObjectiveTime = objectivePanel?.Elapsed ?? 0,
CameraObstruction = debugCameraRay?.Enabled, CameraPolygons = debugCameraRay?.PolygonCount ?? 0,
@@ -1284,6 +1328,7 @@ internal static class Program
}
if (simulation != null && characterDraw != null)
{
characterDraw.Visible=rocketship?.Mounted!=true;
PlayerGadgetMaterial.Apply(characterDraw,simulation.Appearance);
var color=simulation.Appearance.Color;
for(var i=0;i<animations!.Current.Base.Vertices.Length;i++)
@@ -1291,6 +1336,12 @@ internal static class Program
}
renderer.UpdateVertices(mesh.Vertices);
renderer.Render(view * projection);
if(rocketFixture!=null)
{
rocketFixture.AfterFrame(count);
if(RocketshipSmoke.StageName(count) is{} stage&&Option(args,"--screenshot") is{} capture)
renderer.SavePpm(Path.ChangeExtension(capture,$".{stage}.ppm"));
}
if(baseballFixture!=null)
{
baseballFixture.AfterFrame(count);
@@ -1583,6 +1634,12 @@ internal static class Program
if(!headless)Console.WriteLine($"Baseball SDL keys received: {sawBaseballKeys==15}.");
if(!baseballFixture.Passed || !headless && sawBaseballKeys!=15)return 2;
}
if(rocketFixture!=null)
{
Console.WriteLine(rocketFixture.Report);
if(!headless)Console.WriteLine($"Rocketship SDL keys received: {sawRocketKeys==63}.");
if(!rocketFixture.Passed||!headless&&sawRocketKeys!=63)return 2;
}
if (bubbleFixture!=null)
{
Console.WriteLine(bubbleFixture.Report);