Add projectile state feed and diagnostics counters

- Include active projectiles in DUNGEON_STATE payload, spatially filtered

- Track per-ability projectile diagnostics (spawn/hit/expiry) in simulation

- Log periodic projectile diagnostics for ability troubleshooting

- Update pending-clientChanges.md with required projectile rendering update
This commit is contained in:
dingo
2026-02-10 18:39:12 -05:00
parent 8f90f23fd0
commit 90821277eb
3 changed files with 92 additions and 1 deletions
+26
View File
@@ -2951,6 +2951,32 @@ public sealed partial class DungeonHandler : IClientMessageHandler
y = i.Y
}),
projectiles = (sendSpatialThisTick ? sim.Projectiles.Values.Where(p => !spatialFiltering || IsNearby(p.X, p.Y)) : Enumerable.Empty<ProjectileInstance>())
.Select(p => new
{
id = p.Id,
sourceType = p.SourceType.ToString().ToLower(),
sourceMobId = p.SourceMobId,
sourcePlayerId = p.SourcePlayerId,
abilityId = p.AbilityId,
x = p.X,
y = p.Y,
targetX = p.TargetX,
targetY = p.TargetY,
velocityX = p.VelocityX,
velocityY = p.VelocityY,
speed = p.Speed,
damage = p.Damage,
damageTypeKey = p.DamageTypeKey,
aoeRadius = p.AoeRadius,
spriteKey = p.SpriteKey,
isLinear = p.IsLinear,
frontX = p.FrontX,
frontY = p.FrontY,
backX = p.BackX,
backY = p.BackY
}),
portals = sim.Portals.Values
.Where(p => p.IsActive)
.Select(p => new