fixed flames; fixed ftur 'rotation'; fixed repair cursor hotspot
This commit is contained in:
@@ -66,6 +66,21 @@ namespace OpenRa.Effects
|
||||
Combat.DoImpact(Dest, VisualDest - new int2( 0, DestAltitude ),
|
||||
Weapon, Projectile, Warhead, FiredBy);
|
||||
}
|
||||
|
||||
if (Projectile.Trail != null)
|
||||
{
|
||||
var at = (float)t / TotalTime();
|
||||
var altitude = float2.Lerp(SrcAltitude, DestAltitude, at);
|
||||
var pos = float2.Lerp(Src.ToFloat2(), VisualDest.ToFloat2(), at)
|
||||
- 0.5f * anim.Image.size - new float2(0, altitude);
|
||||
|
||||
var highPos = (Projectile.High || Projectile.Arcing)
|
||||
? (pos - new float2(0, (VisualDest - Src).Length * height * 4 * at * (1 - at)))
|
||||
: pos;
|
||||
|
||||
world.AddFrameEndTask(w => w.Add(
|
||||
new Smoke(w, highPos.ToInt2(), Projectile.Trail)));
|
||||
}
|
||||
}
|
||||
|
||||
const float height = .1f;
|
||||
@@ -83,14 +98,14 @@ namespace OpenRa.Effects
|
||||
if (Projectile.High || Projectile.Arcing)
|
||||
{
|
||||
if (Projectile.Shadow)
|
||||
yield return new Renderable(anim.Image, pos, PaletteType.Shadow);
|
||||
yield return new Renderable(anim.Image, pos - .5f * anim.Image.size, PaletteType.Shadow);
|
||||
|
||||
var highPos = pos - new float2(0, (VisualDest - Src).Length * height * 4 * at * (1 - at));
|
||||
|
||||
yield return new Renderable(anim.Image, highPos, Owner.Palette);
|
||||
yield return new Renderable(anim.Image, highPos - .5f * anim.Image.size, Owner.Palette);
|
||||
}
|
||||
else
|
||||
yield return new Renderable(anim.Image, pos, Projectile.UnderWater ? PaletteType.Shadow : Owner.Palette);
|
||||
yield return new Renderable(anim.Image, pos - .5f * anim.Image.size, Projectile.UnderWater ? PaletteType.Shadow : Owner.Palette);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,8 +77,9 @@ namespace OpenRa.Effects
|
||||
var move = speed * -float2.FromAngle((float)angle);
|
||||
Pos += move;
|
||||
|
||||
if (Projectile.Animates)
|
||||
world.AddFrameEndTask(w => w.Add(new Smoke(w, (Pos - 1.5f * move - new int2( 0, Altitude )).ToInt2())));
|
||||
if (Projectile.Trail != null)
|
||||
world.AddFrameEndTask(w => w.Add(
|
||||
new Smoke(w, (Pos - 1.5f * move - new int2( 0, Altitude )).ToInt2(), Projectile.Trail)));
|
||||
|
||||
// todo: running out of fuel
|
||||
}
|
||||
|
||||
@@ -7,11 +7,12 @@ namespace OpenRa.Effects
|
||||
class Smoke : IEffect
|
||||
{
|
||||
readonly int2 pos;
|
||||
readonly Animation anim = new Animation("smokey");
|
||||
readonly Animation anim;
|
||||
|
||||
public Smoke(World world, int2 pos)
|
||||
public Smoke(World world, int2 pos, string trail)
|
||||
{
|
||||
this.pos = pos;
|
||||
anim = new Animation(trail);
|
||||
anim.PlayThen("idle",
|
||||
() => world.AddFrameEndTask(w => w.Remove(this)));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace OpenRa.GameRules
|
||||
public readonly bool AA = false;
|
||||
public readonly bool AG = true;
|
||||
public readonly bool ASW = false;
|
||||
public readonly bool Animates = false;
|
||||
public readonly string Trail = null;
|
||||
public readonly bool Arcing = false;
|
||||
public readonly int Arm = 0;
|
||||
public readonly bool Degenerates = false;
|
||||
|
||||
@@ -2232,7 +2232,7 @@ Arm=10
|
||||
High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Animates=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
Inaccurate=yes
|
||||
Image=V2
|
||||
@@ -2244,7 +2244,7 @@ Arm=2
|
||||
High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Animates=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
Inaccurate=yes
|
||||
AA=yes
|
||||
@@ -2259,7 +2259,7 @@ Arm=3
|
||||
High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Animates=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
AA=yes
|
||||
Image=DRAGON
|
||||
@@ -2273,7 +2273,7 @@ Arm=3
|
||||
High=yes
|
||||
Shadow=no
|
||||
Proximity=yes
|
||||
Animates=yes
|
||||
Trail=smokey
|
||||
Ranged=yes
|
||||
AA=yes
|
||||
AG=no
|
||||
@@ -2351,7 +2351,7 @@ Frames=4
|
||||
|
||||
; wizard's fireball
|
||||
[Fireball]
|
||||
Animates=yes
|
||||
Trail=fb2
|
||||
Image=FB1
|
||||
Frames=8
|
||||
|
||||
|
||||
@@ -930,6 +930,7 @@ FTUR:
|
||||
Description: Flame Turret
|
||||
LongDesc: Anti-Infantry base defense.\n Strong vs Infantry\n Weak vs Aircraft
|
||||
Turreted:
|
||||
ROT: 10
|
||||
Building:
|
||||
Power: -20
|
||||
Footprint: x
|
||||
@@ -941,6 +942,7 @@ FTUR:
|
||||
RenderBuilding:
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: FireballLauncher
|
||||
PrimaryOffset: 0,0,12,8
|
||||
AutoTarget:
|
||||
IronCurtainable:
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
<sequence name="select" start="15" length="6" x="12" y="12" />
|
||||
<sequence name="attackmove" start="21" length="8" x="12" y="12" />
|
||||
<sequence name="move-minimap" start="29" length="6" />
|
||||
<sequence name="repair" start="35" length="24" />
|
||||
<sequence name="repair" start="35" length="24" x="12" y="12" />
|
||||
<sequence name="deploy" start="59" length="9" x="12" y="12" />
|
||||
<sequence name="sell" start="68" length="12" x="12" y="12" />
|
||||
<sequence name="default-minimap" start="80" length="1" />
|
||||
@@ -1034,4 +1034,7 @@
|
||||
<sequence name="bottom-left" start="2" length="1" />
|
||||
<sequence name="bottom-right" start="3" length="1" />
|
||||
</unit>
|
||||
<unit name="fb2">
|
||||
<sequence name="idle" start="0" length="4" />
|
||||
</unit>
|
||||
</sequences>
|
||||
@@ -312,6 +312,8 @@ Dimensions=1,1
|
||||
Footprint=x
|
||||
SelectionPriority=3
|
||||
LongDesc=Anti-Infantry base defense.\n Strong vs Infantry\n Weak vs Aircraft
|
||||
PrimaryOffset=0,0,12,8
|
||||
ROT=10
|
||||
[SAM]
|
||||
Description=SAM Site
|
||||
Traits=Building, Turreted, RenderBuildingTurreted, AttackTurreted, AutoTarget, IronCurtainable
|
||||
|
||||
Reference in New Issue
Block a user