feat(physics): port retail projectile integration
Add a pure Core projectile driver for retail clock quanta, final-state acceleration, 50-unit velocity clamping, world-space angular integration, full-3D AlignPath, and oriented Setup-local sphere sweeps. Preserve exact success versus set_frame-only failure semantics, independent Contact/OnWalkable state, and full-cell identity across all landblock directions. Port OBJECTINFO::missile_ignore with explicit weenie/creature metadata, remove the invented transition-step cap, retain PathClipped without arming PerfectClip, and keep authoritative target identity optional. Add malformed-shape/clock, thin-wall, terrain, target-exclusion, frame-spike, failure-state, and boundary conformance coverage. Retire TS-2 and synchronize the architecture, milestones, roadmap, research oracle, and durable physics memory. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
542dcfc384
commit
f02b995e4f
21 changed files with 1669 additions and 263 deletions
|
|
@ -13,6 +13,38 @@ namespace AcDream.Core.Physics;
|
|||
/// </summary>
|
||||
public static class PhysicsObjUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Retail <c>SetPositionInternal</c> walkability comparison at
|
||||
/// <c>0x00515465-0x0051548E</c>. Equality with FloorZ is walkable.
|
||||
/// </summary>
|
||||
public static bool IsWalkableContact(bool inContact, Vector3 contactNormal)
|
||||
=> inContact && contactNormal.Z >= PhysicsGlobals.FloorZ;
|
||||
|
||||
/// <summary>
|
||||
/// Applies the two independent transient facts written by retail
|
||||
/// <c>CPhysicsObj::SetPositionInternal</c> at <c>0x00515430-0x0051549F</c>.
|
||||
/// Contact comes from contact-plane validity; OnWalkable additionally
|
||||
/// requires a walkable plane normal. A steep contact therefore remains in
|
||||
/// contact without becoming grounded.
|
||||
/// </summary>
|
||||
public static void ApplySetPositionContact(
|
||||
PhysicsBody body,
|
||||
bool inContact,
|
||||
bool onWalkable)
|
||||
{
|
||||
if (inContact)
|
||||
body.TransientState |= TransientStateFlags.Contact;
|
||||
else
|
||||
body.TransientState &= ~TransientStateFlags.Contact;
|
||||
|
||||
if (inContact && onWalkable)
|
||||
body.TransientState |= TransientStateFlags.OnWalkable;
|
||||
else
|
||||
body.TransientState &= ~TransientStateFlags.OnWalkable;
|
||||
|
||||
body.calc_acceleration();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// retail <c>handle_all_collisions</c> (0x00514780). Reflects or zeros the body's
|
||||
/// <see cref="PhysicsBody.Velocity"/> (retail m_velocityVector) based on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue