Working on projectiles3
This commit is contained in:
@@ -1086,6 +1086,7 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
};
|
};
|
||||||
|
|
||||||
dungeon.Simulation.Projectiles.TryAdd(projectile.Id, projectile);
|
dungeon.Simulation.Projectiles.TryAdd(projectile.Id, projectile);
|
||||||
|
Console.WriteLine($"[HandleFireProjectile] Added projectile {projectile.Id} to simulation. Total projectiles: {dungeon.Simulation.Projectiles.Count}");
|
||||||
|
|
||||||
// Broadcast projectile spawned
|
// Broadcast projectile spawned
|
||||||
foreach (var dungeonPlayer in dungeon.Simulation.Players.Values)
|
foreach (var dungeonPlayer in dungeon.Simulation.Players.Values)
|
||||||
|
|||||||
@@ -519,6 +519,11 @@ public partial class DungeonSimulation
|
|||||||
|
|
||||||
private void UpdateProjectiles()
|
private void UpdateProjectiles()
|
||||||
{
|
{
|
||||||
|
if (Projectiles.Count > 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"[UpdateProjectiles] Updating {Projectiles.Count} projectiles. Mobs alive: {Mobs.Values.Count(m => m.IsAlive)}");
|
||||||
|
}
|
||||||
|
|
||||||
var toRemove = new List<int>();
|
var toRemove = new List<int>();
|
||||||
|
|
||||||
foreach (var projectile in Projectiles.Values)
|
foreach (var projectile in Projectiles.Values)
|
||||||
|
|||||||
Reference in New Issue
Block a user