24 lines
3.8 KiB
Markdown
24 lines
3.8 KiB
Markdown
# Parked extraction helicopter: verified landing-gear support
|
|
|
|
The parent's native `logs_2026-09-19_07-20-14` showed ten seconds of an intact, upright, motionless authored Mi8 with a valid controller/simulation/physics and `HasAnyGroundContact()==false`. The caller/helper were alive and correctly positioned. Native helicopter simulation exposes this aggregate contact flag and terrain altitude, but no per-wheel query equivalent to wheeled simulation. The installed vanilla available-action condition also simply reads the aggregate flag; it provides no alternative initialization mechanism. No physics wake, engine start, teleport or simulation mutation is added to production.
|
|
|
|
`ERR_CasualtyGroundSupport` supplies a conservative fallback only for the known Mi8 family when its physics body is asleep and its engine is off. The ordinary native contact path is retained. Existing speed (0.5m/s), angular velocity (0.1rad/s) and upright (up.y >= 0.85) limits still apply to both routes. Powered hovering cannot use the fallback.
|
|
|
|
The installed Mi8_base.et defines three landing-gear bones: `v_wheel_F` with radius 0.30m and `v_wheel_bL`/`v_wheel_bR` with radius 0.45m. Native PointInfo resolves their actual world pivots. All three pivots must exist and remain separated by at least one metre, guarding against failed/collapsed resolution. At each tire bottom, a short vertical trace spans 0.10m above to 0.12m below. Every trace must hit upward-facing collision (normal.y >= 0.85). Hits on the aircraft or its children, dynamic entities and entities without physical support are rejected. Terrain/static collision can support the aircraft; altitude alone cannot. The small tolerance covers collision/placement precision and does not claim exact zero-distance tire contact. Active aircraft without a native contact flag fail closed; unsupported dynamic platforms are outside this fallback.
|
|
|
|
Native PointInfo bone resolution, actual tire-to-ground gaps, awake state and trace normal/entity behavior are still **unverified in the engine for this patch**. The opt-in fixture prints all of them. If the untouched aircraft is awake or its authored geometry lies outside the tight support tolerance, the test will fail explicitly; do not silently widen it or activate physics simply to get a pass.
|
|
|
|
## Files and integration
|
|
|
|
New files:
|
|
|
|
- `addons/core/Scripts/Game/ERR/ERR_CasualtyGroundSupport.c`
|
|
- `addons/core/Scripts/Game/ERR/ERR_NativeCasualtyGroundProbe.c`
|
|
- `tests/test_casualty_ground_policy.py`
|
|
|
|
Apply `ground-support-integration.patch` only to the indicated AircraftReady/Nearby and native casualty-fixture hunks. Its latest central-service baseline preserves the separately reviewed committed-lifecycle changes. Add `test_casualty_ground_policy.py` to the parent's `tools/check.py` test list. No new outcome or BaseSmoke steps are required: the existing `casualty-service` readiness stage runs the bounded ground probe before causing unconsciousness.
|
|
|
|
The positive native check reads the untouched actual mission helicopter. It then spawns a separate empty aircraft twenty metres higher, protects that disposable entity from damage, and verifies airborne rejection. On that clone only, it sets a 90-degree tilt and reads the resulting native up vector, then assigns and immediately reads a nonzero native velocity. The production motion policy is checked independently with those actual values, while full AircraftReady must also reject the clone. This is not a travelled-distance/flight-control test. The clone is deleted on completion or failure. The mission aircraft's transform, velocity, activation, engine and health handling are never changed.
|
|
|
|
The focused support policy test passed. Native compilation, positive wheel support and the negative physics checks remain pending. `source-sha256.json` identifies the exact installed Mi8 configuration inspected.
|