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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user