Fix all 7 Cut 5d Soul findings: GL3 Sion perf >=57fps, PVS death gating, crater dedupe, hit-marker filter, loadout baseline, remote dust yaw/speed, distance-gated death trauma
This commit is contained in:
parent
323c02cf8d
commit
fcb91edb0d
16 changed files with 574 additions and 143 deletions
|
|
@ -47,7 +47,54 @@ public sealed class CameraJuiceState
|
|||
_time = 0f;
|
||||
}
|
||||
|
||||
public void ConsumeEvents(IReadOnlyList<ISimEvent> events, int localContenderId, Vector3 localPos)
|
||||
public void ConsumeEvents(
|
||||
IReadOnlyList<ISimEvent> events,
|
||||
int localContenderId,
|
||||
Vector3 localPos,
|
||||
IClientArenaSession? session = null)
|
||||
{
|
||||
ConsumeEvents(events, localContenderId, localPos, session is null ? null : (isContender, id) =>
|
||||
{
|
||||
if (isContender)
|
||||
{
|
||||
var contenders = session.ViewState.Contenders;
|
||||
if (id >= 0 && id < contenders.Count && (id == session.LocalContenderId || session.IsContenderVisible(id)))
|
||||
{
|
||||
var c = contenders[id];
|
||||
return (true, new Vector3(c.X, c.Y, c.Z));
|
||||
}
|
||||
return (false, Vector3.Zero);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (session.IsSpectatorVisible(id))
|
||||
{
|
||||
var specs = session.ViewState.Spectators.Spectators;
|
||||
for (int s = 0; s < specs.Count; s++)
|
||||
{
|
||||
if (specs[s].Id == id)
|
||||
{
|
||||
var sp = specs[s];
|
||||
return (true, new Vector3(sp.X, sp.Y, sp.Z));
|
||||
}
|
||||
}
|
||||
int sIdx = id >= 1000 ? id - 1000 : id;
|
||||
if (sIdx >= 0 && sIdx < specs.Count)
|
||||
{
|
||||
var sp = specs[sIdx];
|
||||
return (true, new Vector3(sp.X, sp.Y, sp.Z));
|
||||
}
|
||||
}
|
||||
return (false, Vector3.Zero);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ConsumeEvents(
|
||||
IReadOnlyList<ISimEvent> events,
|
||||
int localContenderId,
|
||||
Vector3 localPos,
|
||||
Func<bool, int, (bool Visible, Vector3 Pos)>? resolveActor)
|
||||
{
|
||||
for (int i = 0; i < events.Count; i++)
|
||||
{
|
||||
|
|
@ -92,15 +139,39 @@ public sealed class CameraJuiceState
|
|||
break;
|
||||
}
|
||||
|
||||
case ContenderEliminatedEvent:
|
||||
case SpectatorDestroyedEvent:
|
||||
// Large chassis detonation thump when nearby (camera-local subtle shake)
|
||||
AddTrauma(0.14f);
|
||||
case ContenderEliminatedEvent elim:
|
||||
ApplyDeathTrauma(isContender: true, elim.VictimId, localPos, resolveActor);
|
||||
break;
|
||||
|
||||
case SpectatorDestroyedEvent sdet:
|
||||
ApplyDeathTrauma(isContender: false, sdet.SpectatorId, localPos, resolveActor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyDeathTrauma(
|
||||
bool isContender,
|
||||
int entityId,
|
||||
Vector3 localPos,
|
||||
Func<bool, int, (bool Visible, Vector3 Pos)>? resolveActor)
|
||||
{
|
||||
if (resolveActor is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var (visible, pos) = resolveActor(isContender, entityId);
|
||||
if (!visible)
|
||||
{
|
||||
return;
|
||||
}
|
||||
float dist = Vector3.Distance(pos, localPos);
|
||||
if (dist < 90f)
|
||||
{
|
||||
AddTrauma(0.14f * (1f - dist / 90f));
|
||||
}
|
||||
}
|
||||
|
||||
public void ConsumeFootsteps(IReadOnlyList<FootstepPulse> footsteps, int localContenderId)
|
||||
{
|
||||
for (int i = 0; i < footsteps.Count; i++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue