GUNS PELASE WORK.
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
/// </summary>
|
||||
public float Velocity => _velocity;
|
||||
private float _velocity;
|
||||
|
||||
|
||||
private string _muzzleFlashSprite;
|
||||
|
||||
public string SoundCollectionEject => _soundCollectionEject;
|
||||
@@ -104,7 +104,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
}
|
||||
}
|
||||
|
||||
public IEntity TakeBullet()
|
||||
public IEntity TakeBullet(GridCoordinates spawnAt)
|
||||
{
|
||||
if (_ammoIsProjectile)
|
||||
{
|
||||
@@ -121,12 +121,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
{
|
||||
appearanceComponent.SetData(AmmoVisuals.Spent, true);
|
||||
}
|
||||
|
||||
var entity = Owner.EntityManager.SpawnEntity(_projectileId, Owner.Transform.GridPosition);
|
||||
|
||||
var entity = Owner.EntityManager.SpawnEntity(_projectileId, spawnAt);
|
||||
DebugTools.AssertNotNull(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
public void MuzzleFlash(GridCoordinates grid, Angle angle)
|
||||
{
|
||||
if (_muzzleFlashSprite == null)
|
||||
@@ -138,7 +138,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
var deathTime = time + TimeSpan.FromMilliseconds(200);
|
||||
// Offset the sprite so it actually looks like it's coming from the gun
|
||||
var offset = angle.ToVec().Normalized / 2;
|
||||
|
||||
|
||||
var message = new EffectSystemMessage
|
||||
{
|
||||
EffectSprite = _muzzleFlashSprite,
|
||||
|
||||
Reference in New Issue
Block a user