Grid map detaching: content edition.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
|
||||
}
|
||||
|
||||
void IAfterAttack.Afterattack(IEntity user, LocalCoordinates clicklocation, IEntity attacked)
|
||||
void IAfterAttack.Afterattack(IEntity user, GridLocalCoordinates clicklocation, IEntity attacked)
|
||||
{
|
||||
var location = user.GetComponent<TransformComponent>().LocalPosition;
|
||||
var angle = new Angle(clicklocation.ToWorld().Position - location.ToWorld().Position);
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan
|
||||
|
||||
string spritename = "Objects/laser.png";
|
||||
|
||||
protected override void Fire(IEntity user, LocalCoordinates clicklocation)
|
||||
protected override void Fire(IEntity user, GridLocalCoordinates clicklocation)
|
||||
{
|
||||
var userposition = user.GetComponent<TransformComponent>().WorldPosition; //Remember world positions are ephemeral and can only be used instantaneously
|
||||
var angle = new Angle(clicklocation.Position - userposition);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
|
||||
|
||||
private float _velocity = 20f;
|
||||
|
||||
protected override void Fire(IEntity user, LocalCoordinates clicklocation)
|
||||
protected override void Fire(IEntity user, GridLocalCoordinates clicklocation)
|
||||
{
|
||||
var userposition = user.GetComponent<TransformComponent>().LocalPosition; //Remember world positions are ephemeral and can only be used instantaneously
|
||||
var angle = new Angle(clicklocation.Position - userposition.Position);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged
|
||||
{
|
||||
public override string Name => "RangedWeapon";
|
||||
|
||||
void IAfterAttack.Afterattack(IEntity user, LocalCoordinates clicklocation, IEntity attacked)
|
||||
void IAfterAttack.Afterattack(IEntity user, GridLocalCoordinates clicklocation, IEntity attacked)
|
||||
{
|
||||
if (UserCanFire(user) && WeaponCanFire())
|
||||
{
|
||||
@@ -27,7 +27,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged
|
||||
return true;
|
||||
}
|
||||
|
||||
protected virtual void Fire(IEntity user, LocalCoordinates clicklocation)
|
||||
protected virtual void Fire(IEntity user, GridLocalCoordinates clicklocation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user