Delete AetheriaMath in favour of CultMath
AetheriaMath predates the CultMath swap and re-implemented helpers CultMath now owns. Callers use CultMath directly: decay (Ship, AetherDrive, Entity), damp (VelocityConversion, FieldTester, FieldDriver), first_order_intercept (TurretController, Combat, GuidedProjectile), quadratic_bezier (FieldDriver) and smootherstep (Ship). Parameter order matches in every case, and those formulas have the same float evaluation order, so behaviour is unchanged. Galaxy's commented-out segment check names distance_to_segment. The other overloads had no callers and are dropped without a CultMath counterpart being needed: the double Damp overloads, FindDistanceToSegment, GetCatmullRomPosition, GetCubicSplinePosition, Smoothstep(x), and the Deg2Rad/Rad2Deg constants. AetherDb census, factions and hardpoint-fit are byte-identical to the pre-cut captures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e308c19e4c
commit
55c3fc6a49
12 changed files with 19 additions and 273 deletions
|
|
@ -99,11 +99,11 @@ public class AetherDrive : Behavior
|
|||
var couplingEfficiency = Evaluate(_data.CouplingEfficiency);
|
||||
var efficiency = float3(saturate(1 - speed / max(rotorSpeed.xy, 1) * sign(_axis.xy)) * couplingEfficiency, 1);
|
||||
|
||||
Thrust = (Rpm - AetheriaMath.Decay(Rpm, _data.CouplingLambda, dt)) * _data.RotorMass * efficiency;
|
||||
Thrust = (Rpm - decay(Rpm, _data.CouplingLambda, dt)) * _data.RotorMass * efficiency;
|
||||
|
||||
var couplingLambda = _data.CouplingLambda * Item.Evaluate(_data.LambdaMultiplier) * max(abs(_axis), Evaluate(_data.PassiveCoupling));
|
||||
var previousRpm = Rpm;
|
||||
Rpm = AetheriaMath.Decay(Rpm, couplingLambda, dt);
|
||||
Rpm = decay(Rpm, couplingLambda, dt);
|
||||
var rpmLoss = previousRpm - Rpm;
|
||||
var force = rpmLoss * _data.RotorMass * efficiency;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class TurretController : Behavior, IInitializableBehavior
|
|||
{
|
||||
var targetHullData = Entity.ItemManager.GetData(Entity.Target.Value.Hull) as HullData;
|
||||
var targetVelocity = float3(Entity.Target.Value.Velocity.x, 0, Entity.Target.Value.Velocity.y);
|
||||
var predictedPosition = AetheriaMath.FirstOrderIntercept(
|
||||
var predictedPosition = first_order_intercept(
|
||||
Entity.Position, float3.zero, _shotSpeed,
|
||||
Entity.Target.Value.Position, targetVelocity
|
||||
);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class VelocityConversion : Behavior
|
|||
|
||||
public override bool Execute(float dt)
|
||||
{
|
||||
Entity.Velocity = AetheriaMath.Damp(Entity.Velocity, Entity.Direction * length(Entity.Velocity), Evaluate(_data.Lambda), dt);
|
||||
Entity.Velocity = damp(Entity.Velocity, Entity.Direction * length(Entity.Velocity), Evaluate(_data.Lambda), dt);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue