implement fast bullets

This commit is contained in:
Vinzenz Schroeter 2024-04-29 16:59:37 +02:00
parent 9ccb7c8df8
commit 9164d90443
7 changed files with 30 additions and 24 deletions

View file

@ -1,5 +1,3 @@
using System.Diagnostics;
namespace TanksServer.GameLogic;
internal sealed class ShootFromTanks(
@ -32,8 +30,7 @@ internal sealed class ShootFromTanks(
UsedBullets = (byte)(tank.Magazine.UsedBullets + 1)
};
var explosive = tank.Magazine.Type.HasFlag(MagazineType.Explosive);
tank.Owner.Scores.ShotsFired++;
entityManager.SpawnBullet(tank.Owner, tank.Position, tank.Orientation / 16d, explosive);
entityManager.SpawnBullet(tank.Owner, tank.Position, tank.Orientation / 16d, tank.Magazine.Type);
}
}