leka1986
|
506073022b
|
Update DynamicCargo.lua
- Added C-130-specific transport state handling to avoid false unloads with `ropelength = 0`.
- Added state flow for C-130 cargo:
- attach (grounded proximity)
- detach (airborne + distance)
- airborne confirm
- landed-stable confirm
- unload event only after landed-stable check
- Added owner re-resolve fallback for C-130 when owner/unit refs are stale.
- Added C-130 config values:
- `C130AttachDistance = 10`
- `C130DetachDistance = 14`
- `C130AirborneAGL = 8`
- `C130LandedAGL = 0.5`
- `C130StabilityEpsilon = 0.05`
- `C130RequireAirborne = true`
- owner resolve thresholds (`Move2D`, `Near2D`, `Max3D`)
- Updated default scheduler interval to `5` seconds.
- Changed tracking to one global timer for all tracked DynamicCargo objects:
- starts when cargo exists
- stops when no tracked cargo remains
- Added/updated aircraft dimensions table entries:
- `CH-47Fbl1`, `Mi-8MTV2`, `Mi-8MT`, `UH-1H`, `Mi-24P`, `UH-60L`, `UH-60L_DAP`, `C-130J-30`
- Added helper getters:
- `IsAttached()`
- `IsDetached()`
- `WasAirborneTransport()`
- `IsLandedStable()`
- `GetCarrierUnitName()`
- `GetCarrierTypeName()`
- `GetCarrierGroupName()`
**Behavior note**
- Non-C130 behavior stays on the existing logic path.
- Existing DynamicCargo event IDs and flow are kept (`New`, `Loaded`, `Unloaded`, `Removed`).
|
2026-03-03 19:37:42 +01:00 |
|