added pathing debug
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRa.Game.Traits
|
||||
var weapon = Rules.WeaponInfo[ weaponName ];
|
||||
if( weapon.Range * weapon.Range < ( target.Location - self.Location ).LengthSquared ) return false;
|
||||
|
||||
fireDelay = 25 * weapon.ROF / 15;
|
||||
fireDelay = weapon.ROF;
|
||||
|
||||
Game.world.Add( new Bullet( weaponName, self.Owner, self,
|
||||
self.CenterLocation.ToInt2(),
|
||||
@@ -90,7 +90,7 @@ namespace OpenRa.Game.Traits
|
||||
this.Target = target;
|
||||
}
|
||||
|
||||
public override void Apply()
|
||||
public override void Apply( bool doVoice )
|
||||
{
|
||||
var mobile = Attacker.traits.GetOrDefault<Mobile>();
|
||||
if (mobile != null)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRa.Game.Traits
|
||||
Location = location;
|
||||
}
|
||||
|
||||
public override void Apply()
|
||||
public override void Apply( bool doVoice )
|
||||
{
|
||||
var mobile = Unit.traits.Get<Mobile>();
|
||||
mobile.QueueActivity( new Mobile.Turn( 96 ) );
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace OpenRa.Game.Traits
|
||||
public CurrentActivity NextActivity { get; set; }
|
||||
|
||||
int2? destination;
|
||||
List<int2> path;
|
||||
public List<int2> path;
|
||||
Func<Actor, Mobile, List<int2>> getPath;
|
||||
|
||||
MovePart move;
|
||||
@@ -313,6 +313,13 @@ namespace OpenRa.Game.Traits
|
||||
path.Clear();
|
||||
NextActivity = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<int2> GetCurrentPath()
|
||||
{
|
||||
var move = currentActivity as MoveTo;
|
||||
if (move == null || move.path == null) return new int2[] { };
|
||||
return Enumerable.Reverse(move.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user