fast bullet accelerates instead of being fast immediately

This commit is contained in:
Vinzenz Schroeter 2024-05-07 21:48:58 +02:00
parent 68e61c5204
commit b1df817ece
5 changed files with 11 additions and 5 deletions

View file

@ -17,7 +17,6 @@ internal sealed class MapEntityManager(
public void SpawnBullet(Player tankOwner, FloatPosition position, double rotation, MagazineType type)
{
var speed = _rules.BulletSpeed * (type.HasFlag(MagazineType.Fast) ? 2 : 1);
_bullets.Add(new Bullet
{
Owner = tankOwner,
@ -26,8 +25,9 @@ internal sealed class MapEntityManager(
IsExplosive = type.HasFlag(MagazineType.Explosive),
Timeout = DateTime.Now + _bulletTimeout,
OwnerCollisionAfter = DateTime.Now + TimeSpan.FromSeconds(1),
Speed = speed,
IsSmart = type.HasFlag(MagazineType.Smart)
Speed = _rules.BulletSpeed,
IsSmart = type.HasFlag(MagazineType.Smart),
Acceleration = type.HasFlag(MagazineType.Fast) ? _rules.FastBulletAcceleration : 0d
});
}