Logging Change for EF Core, and Simulation fix

This commit is contained in:
dingo
2026-01-26 08:15:42 -05:00
parent 21b09ed90a
commit 753ea003a6
3 changed files with 13 additions and 10 deletions
+5 -5
View File
@@ -605,14 +605,14 @@ public partial class DungeonSimulation
float distance = Distance(projectile.X, projectile.Y, mob.X, mob.Y);
// Debug: Log every projectile-mob distance check
if (Projectiles.Count > 0 && projectile.Id % 10 == 0) // Log every 10th projectile to reduce spam
{
Console.WriteLine($"[Projectile {projectile.Id}] Pos: ({projectile.X:F1}, {projectile.Y:F1}), Mob {mob.Id} Pos: ({mob.X:F1}, {mob.Y:F1}), Distance: {distance:F1}");
}
//if (Projectiles.Count > 0 && projectile.Id % 10 == 0) // Log every 10th projectile to reduce spam
//{
// Console.WriteLine($"[Projectile {projectile.Id}] Pos: ({projectile.X:F1}, {projectile.Y:F1}), Mob {mob.Id} Pos: ({mob.X:F1}, {mob.Y:F1}), Distance: {distance:F1}");
//}
if (distance < 50) // Increased from 20 to account for projectile speed (15px/tick movement)
{
Console.WriteLine($"[Projectile {projectile.Id}] HIT mob {mob.Id} at distance {distance:F1}! Damage: {projectile.Damage}");
//Console.WriteLine($"[Projectile {projectile.Id}] HIT mob {mob.Id} at distance {distance:F1}! Damage: {projectile.Damage}");
// Get player instance for damage calculation
PlayerInstance? sourcePlayer = null;
if (Players.TryGetValue(projectile.SourcePlayerId, out var playerInst))