Fix RMB exit from obsolete world-grab guard

This commit is contained in:
chazmm committed 2026-09-08 16:36:19 +01:00
1 parent 5f1cf8249d
commit b27119ae91
6 files changed
+14 -71

No files matched your search

@@ -268,7 +268,6 @@ pub(crate) fn advance(
skeleton_elapsed_16505: &mut life.skeleton_elapsed_16505,
skeleton_ground_16388: &mut life.skeleton_ground_16388,
// Original830BD4A0 initializer82F825F0 splats8216DEE0=-1.
world_grab_reset_direction: [-1.0; 4],
move_future_deck: &mut move_future,
trajectory: &mut life.trajectory,
},
@@ -4,7 +4,6 @@ mod corrections;
mod entry;
mod state;
mod update;
mod world_grab;
pub(crate) use update::{GroundUpdateFrame, GroundUpdateTargets};
mod trajectory;
pub(crate) use entry::GroundEntryTargets;
@@ -20,7 +20,6 @@ use skate_core::{
use skate_data::collections::Collections;
pub(crate) struct GroundState {
pub world_grab: super::world_grab::GroundWorldGrabState,
pub state: PhysicsGroundState,
pub pumping: PumpingState,
pub wobble: SpeedWobbleState,
@@ -38,7 +37,6 @@ impl GroundState {
pub fn load(data: &Collections, _mode: &str, human_player: bool) -> Result<Self, String> {
let push = |field| data.float("physics_push", "default", field);
Ok(Self {
world_grab: super::world_grab::GroundWorldGrabState::default(),
state: PhysicsGroundState::before_first_enter(human_player),
pumping: PumpingState::reset_state(),
wobble: SpeedWobbleState([0; 8]),
@@ -1,6 +1,6 @@
//! Ordinary Ground82D37C88 executes persistent controller updates and actual
//!body forces before prediction and IK publication. Skitch's active query and
//!force path is a distinct behavior; absent world data cannot simulate it.
//!body forces before prediction and IK publication. Ground's handplant query
//!82D38430 is dispatched by ground_phase through the retained Handplant owner.
use super::{
super::{
animated_skeleton::AnimatedSkeleton, animation_input::AnimationInput, foot_ik::FootIk,
@@ -32,7 +32,6 @@ pub(crate) struct GroundUpdateTargets<'a, T> {
pub foot_ik: &'a mut FootIk,
pub skeleton_elapsed_16505: &'a mut bool,
pub skeleton_ground_16388: &'a mut bool,
pub world_grab_reset_direction: [f32; 4],
///Applies to SkeletonDrives hook432 body and Skeleton16112 together.
pub move_future_deck: &'a mut dyn FnMut(Vector3) -> Result<(), String>,
pub trajectory: &'a mut GroundTrajectoryState<T>,
@@ -58,11 +57,10 @@ impl GroundState {
if signals.set_skeleton_flag_16505 {
*targets.skeleton_elapsed_16505 = true;
}
if p.flags_2476 & 0x0040_0000 != 0 {
return Err("Active world-grab requires recovered Skitch query/force behavior; ordinary Ground cannot invent an object".into());
}
self.world_grab
.clear_inactive(targets.world_grab_reset_direction);
//GrabWorld (2476 bit22) requests Handplant::ground_query82D38430,
//already submitted by ground_phase. It is not proof of a Skitch object.
//The same Handplant owner handles the inactive reset and a query miss;
//ordinary ground forces continue for both held and released input.
let pumping_mode = self.pumping_settings.mode(p.state_variant_index_2528)?;
self.pumping_settings.update(
&mut self.pumping,
@@ -1,59 +0,0 @@
//! Typed Skitch/world-grab observations. Ground inactive82D38430 executes
//!Stop82D62F20 and predictor reset82D65FB8 before pumping. A target is present
//!only when the world query owner supplied an actual object observation.
#[derive(Clone, Debug)]
pub(crate) struct WorldGrabObservation {
pub object: u64,
pub position: [f32; 4],
pub relative_velocity: [f32; 4],
}
#[derive(Clone, Debug, Default)]
pub(crate) struct GroundWorldGrabState {
pub observation: Option<WorldGrabObservation>,
pub contact_flags: u32,
pub contact_time: f32,
pub contact_position: [f32; 4],
pub contact_velocity: [f32; 4],
pub contact_valid: bool,
pub active: bool,
pub secondary_active: bool,
pub selected_count: u32,
pub position: [f32; 4],
pub probe_distances: [[f32; 4]; 4],
pub probe_weights: [[f32; 4]; 2],
pub query_points: [[f32; 4]; 2],
pub query_normals: [[f32; 4]; 2],
pub query_word: u32,
pub query_scalar: f32,
pub query_valid: [bool; 2],
pub output_scalar: f32,
pub output_direction: [f32; 4],
pub output_flags: u32,
}
impl GroundWorldGrabState {
///The shared vector comes from native global830BD4A0's initializer. It
///must be supplied by that producer, never inferred from ground normal.
pub fn clear_inactive(&mut self, reset_direction: [f32; 4]) {
self.active = false;
self.secondary_active = false;
self.contact_flags &= 0x4fff_ffff;
self.contact_time = f32::MAX;
self.contact_position = [0.0; 4];
self.contact_valid = false;
self.contact_velocity = [0.0; 4];
self.observation = None;
self.probe_distances = [[-1.0; 4]; 4];
self.probe_weights = [[0.0; 4]; 2];
self.selected_count = 0;
self.position = [0.0; 4];
//82D65FB8 writes two literal UnitY normals and two zero points.
self.query_points = [[0.0; 4]; 2];
self.query_normals = [[0.0, 1.0, 0.0, 0.0]; 2];
self.query_word = 0;
self.query_scalar = 0.0;
self.query_valid = [false; 2];
self.output_scalar = 0.0;
self.output_direction = reset_direction;
self.output_flags &= 0x3fff_ffff;
}
}
+8
View File
@@ -39,6 +39,14 @@ backtraces are enabled. On failure the launcher displays the saved output and
keeps the console open. Earlier launcher runs did not save output, so their
simulation error messages cannot be recovered from this directory.
The RMB/RB crash recorded at tick259 was an explicit Ground error on
`GrabWorld` (Processed2476 bit22). That older placeholder misidentified
`82D38430` as an unsupported Skitch query. The TU3 function actually submits
the handplant candidate via `82D61268`, or resets it via `82D62F20` when the
input is released. Those paths already run through `handplant::ground_query`
and `ground_update`. The obsolete error and its unused duplicate manager have
been removed; input still reaches the stock graphs and handplant selector.
The task executable is a separate copy, built with:
```powershell