Combat feel: correct boss bar, player hit-flash, dash-to-move, finisher hit-stop
Boss bar reconstructs the true max client-side (Health.Max unreplicated) via Kind==Charger + expedition-pos filter; boss slam telegraph = a full ground ring at BossSlamRadius; IsAttacking OR's IsLunging. Player body flash on hurt (distinct red, jitter-safe threshold). Dash toward movement input when moving else facing. Warrior cone: muzzle-cue suppressed (cone arc is its cue). Minimal finisher-only hit-stop (PrototypeCameraRig.Hold, behind FeelConfig flag; never Time.timeScale). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -312,13 +312,25 @@ namespace ProjectM.Client
|
||||
}
|
||||
}
|
||||
|
||||
// Local-player fire feedback: AbilityCooldown.NextFireTick advances on each shot.
|
||||
// C3: a CONE ability (the Warrior cleave) gets the dedicated cone-arc cue below, NOT the projectile muzzle
|
||||
// flash + zap (those read as a ranged shot). Detect the local ability archetype once and gate the muzzle.
|
||||
bool localIsCone = false;
|
||||
if (_localPlayer != Entity.Null && EntityManager.HasComponent<AbilityRef>(_localPlayer)
|
||||
&& SystemAPI.TryGetSingleton<AbilityDatabase>(out var muzDb) && muzDb.Value.IsCreated)
|
||||
{
|
||||
ref var muzAdb = ref muzDb.Value.Value;
|
||||
if (muzAdb.TryGetAbility(EntityManager.GetComponentData<AbilityRef>(_localPlayer).Id, out var muzDef)
|
||||
&& muzDef.Archetype == (byte)AbilityArchetype.Cone)
|
||||
localIsCone = true;
|
||||
}
|
||||
|
||||
// Local-player fire feedback: AbilityCooldown.NextFireTick advances on each shot.
|
||||
// Raw uint inequality is intentional here: only the edge (a new shot) matters and the worst case
|
||||
// of a tick wrap is a single dropped/duplicated muzzle flash — purely cosmetic, never the sim.
|
||||
if (_localPlayer != Entity.Null && EntityManager.HasComponent<AbilityCooldown>(_localPlayer))
|
||||
{
|
||||
uint nextFire = EntityManager.GetComponentData<AbilityCooldown>(_localPlayer).NextFireTick;
|
||||
if (_fireTickInit && nextFire != 0 && nextFire != _lastLocalFireTick)
|
||||
if (_fireTickInit && nextFire != 0 && nextFire != _lastLocalFireTick && !localIsCone)
|
||||
{
|
||||
Burst(_muzzleFx, cfg != null ? cfg.Muzzle : null, (Vector3)localPos + Vector3.up * 0.9f, 8);
|
||||
PlayClip(_fireClip, (Vector3)localPos, 0.5f);
|
||||
@@ -398,7 +410,11 @@ namespace ProjectM.Client
|
||||
if (FeelConfig.RumbleEnabled && AimPresentation.Scheme == 1)
|
||||
RumbleUtil.Pulse(FeelConfig.RumbleHit * 0.6f, FeelConfig.RumbleHit, FeelConfig.RumbleDurationSec);
|
||||
}
|
||||
if (finisher) PrototypeCameraRig.PunchFov(FeelConfig.DashFovKick * 0.6f, FeelConfig.HitStopDurationMs);
|
||||
if (finisher)
|
||||
{
|
||||
PrototypeCameraRig.PunchFov(FeelConfig.DashFovKick * 0.6f, FeelConfig.HitStopDurationMs);
|
||||
if (FeelConfig.HitStopFreezeEnabled) PrototypeCameraRig.Hold(FeelConfig.HitStopMaxFrames); // C4: a beat of crunch on the combo finisher (the deliberate payoff hit)
|
||||
}
|
||||
}
|
||||
_lastLocalSwingTick = mc.SwingStartTick;
|
||||
_swingTickInit = true;
|
||||
@@ -938,6 +954,8 @@ namespace ProjectM.Client
|
||||
if (_fxRoot == null || _dangerMat == null) return;
|
||||
Unity.NetCode.NetworkTick serverTick = SystemAPI.TryGetSingleton<NetworkTime>(out var nt) ? nt.ServerTick : default;
|
||||
_dangerSeen.Clear();
|
||||
bool bossRoom = SystemAPI.TryGetSingleton<RunInfo>(out var dangerRi) && dangerRi.Lifecycle == RunLifecycle.InRoom && dangerRi.CurrentRoomType == RoomTypeId.Boss; // A7: in a Boss room the Charger-kind enemy IS the boss (adds are swarmers)
|
||||
|
||||
if (serverTick.IsValid)
|
||||
{
|
||||
foreach (var (xf, stats, windup, tele, entity) in
|
||||
@@ -946,6 +964,8 @@ namespace ProjectM.Client
|
||||
{
|
||||
// Feature D: a committed Charger lunge keeps the cue ALIVE past windup (AttackWindup zeroes at commit).
|
||||
bool lunging = SystemAPI.HasComponent<IsLunging>(entity) && SystemAPI.IsComponentEnabled<IsLunging>(entity);
|
||||
bool isBoss = bossRoom && tele.ValueRO.Kind == ZoneEnemyMath.KindCharger; // A7: boss radial SLAM telegraph
|
||||
|
||||
uint until = windup.ValueRO.WindUpUntilTick;
|
||||
if (until == 0u && !lunging) continue;
|
||||
|
||||
@@ -961,7 +981,7 @@ namespace ProjectM.Client
|
||||
int remaining = untilTick.TicksSince(serverTick);
|
||||
// Feature C: per-enemy windup duration (baked, client-safe) -> ramps 0->1 ending AT impact for
|
||||
// any windup length (fixes the Charger plateauing early under the old hard-coded 22).
|
||||
float windupDur = math.max(1f, tele.ValueRO.WindupTicks);
|
||||
float windupDur = isBoss ? Tuning.BossSlamWindupTicks : math.max(1f, tele.ValueRO.WindupTicks); // A7: ramp over the boss's real slam wind-up
|
||||
intensity = math.saturate(1f - remaining / windupDur);
|
||||
|
||||
// Near-impact strike beep (deferred-items pass): a "dodge NOW" cue once per windup, gated to
|
||||
@@ -1003,7 +1023,13 @@ namespace ProjectM.Client
|
||||
}
|
||||
float coneRange = math.max(1f, stats.ValueRO.AttackRange + 0.6f);
|
||||
if (lunging) coneRange += 1.5f; // forward-stretch the wedge to read the committed travel
|
||||
if (tele.ValueRO.Kind == ZoneEnemyMath.KindSpitter)
|
||||
if (isBoss)
|
||||
{
|
||||
// A7: the boss SLAM is RADIAL (Tuning.BossSlamRadius) -> paint a FULL ground ring so the tell
|
||||
// matches the hit area (a forward wedge sized to melee reach would lie about a radial AoE).
|
||||
BuildDangerMesh(go.GetComponent<MeshFilter>().sharedMesh, Tuning.BossSlamRadius, 3.14159f, intensity);
|
||||
}
|
||||
else if (tele.ValueRO.Kind == ZoneEnemyMath.KindSpitter)
|
||||
{
|
||||
// MC-3: a Spitter is a RANGED threat — a melee wedge at its feet is useless. Paint a thin aim
|
||||
// LANE along its (face-locked) facing out to projectile reach during wind-up, brightening as the
|
||||
|
||||
Reference in New Issue
Block a user