Unhardcode Missile freefall gravity

This commit is contained in:
reaperrr
2016-01-01 15:44:07 +01:00
parent c02206601c
commit 671f5af723

View File

@@ -76,6 +76,9 @@ namespace OpenRA.Mods.Common.Effects
[Desc("Vertical rate of turn.")] [Desc("Vertical rate of turn.")]
public readonly int VerticalRateOfTurn = 6; public readonly int VerticalRateOfTurn = 6;
[Desc("Gravity applied while in free fall.")]
public readonly int Gravity = 10;
[Desc("Run out of fuel after being activated this many ticks. Zero for unlimited fuel.")] [Desc("Run out of fuel after being activated this many ticks. Zero for unlimited fuel.")]
public readonly int RangeLimit = 0; public readonly int RangeLimit = 0;
@@ -152,8 +155,7 @@ namespace OpenRA.Mods.Common.Effects
readonly ProjectileArgs args; readonly ProjectileArgs args;
readonly Animation anim; readonly Animation anim;
// NOTE: Might be desirable to unhardcode the number -10 readonly WVec gravity;
readonly WVec gravity = new WVec(0, 0, -10);
int ticks; int ticks;
@@ -191,6 +193,7 @@ namespace OpenRA.Mods.Common.Effects
pos = args.Source; pos = args.Source;
hFacing = args.Facing; hFacing = args.Facing;
gravity = new WVec(0, 0, -info.Gravity);
targetPosition = args.PassiveTarget; targetPosition = args.PassiveTarget;
var world = args.SourceActor.World; var world = args.SourceActor.World;