diff --git a/OpenRA.Mods.RA/Crushable.cs b/OpenRA.Mods.RA/Crushable.cs new file mode 100644 index 0000000000..15f7595724 --- /dev/null +++ b/OpenRA.Mods.RA/Crushable.cs @@ -0,0 +1,74 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using System.Linq; +using OpenRA.Mods.RA.Move; +using OpenRA.Mods.RA.Render; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + [Desc("This actor is crushable.")] + class CrushableInfo : ITraitInfo + { + [Desc("Sound to play when being crushed.")] + public readonly string CrushSound = null; + [Desc("Which crush classes does this actor belong to.")] + public readonly string[] CrushClasses = { "infantry" }; + [Desc("Probability of mobile actors noticing and evading a crush attempt.")] + public readonly int WarnProbability = 75; + [Desc("Will friendly units just crush me instead of pathing around.")] + public readonly bool CrushedByFriendlies = false; + + public object Create(ActorInitializer init) { return new Crushable(init.self, this); } + } + + class Crushable : ICrushable + { + readonly Actor self; + readonly CrushableInfo info; + + public Crushable(Actor self, CrushableInfo info) + { + this.self = self; + this.info = info; + } + + public void WarnCrush(Actor crusher) + { + var mobile = self.TraitOrDefault(); + if (mobile != null && self.World.SharedRandom.Next(100) <= info.WarnProbability) + mobile.Nudge(self, crusher, true); + } + + public void OnCrush(Actor crusher) + { + Sound.Play(info.CrushSound, crusher.CenterPosition); + var wda = self.TraitOrDefault(); + if (wda != null) + { + var palette = wda.Info.DeathSequencePalette; + if (wda.Info.DeathPaletteIsPlayerPalette) + palette += self.Owner.InternalName; + + wda.SpawnDeathAnimation(self, wda.Info.CrushedSequence, palette); + } + self.Kill(crusher); + } + + public bool CrushableBy(string[] crushClasses, Player crushOwner) + { + if (!info.CrushedByFriendlies && crushOwner.IsAlliedWith(self.Owner)) + return false; + + return info.CrushClasses.Intersect(crushClasses).Any(); + } + } +} diff --git a/OpenRA.Mods.RA/CrushableInfantry.cs b/OpenRA.Mods.RA/CrushableInfantry.cs deleted file mode 100644 index 52ec8b843a..0000000000 --- a/OpenRA.Mods.RA/CrushableInfantry.cs +++ /dev/null @@ -1,61 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Linq; -using OpenRA.Mods.RA.Move; -using OpenRA.Mods.RA.Render; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class CrushableInfantryInfo : ITraitInfo, Requires, Requires - { - public readonly string CrushSound = null; - public readonly string CorpseSequence = "die-crushed"; - public readonly string[] CrushClasses = { "infantry" }; - public readonly int WarnProbability = 75; - public object Create(ActorInitializer init) { return new CrushableInfantry(init.self, this); } - } - - class CrushableInfantry : ICrushable - { - readonly Actor self; - readonly CrushableInfantryInfo Info; - readonly RenderInfantry ri; - - public CrushableInfantry(Actor self, CrushableInfantryInfo info) - { - this.self = self; - this.Info = info; - ri = self.Trait(); - } - - public void WarnCrush(Actor crusher) - { - if (self.World.SharedRandom.Next(100) <= Info.WarnProbability) - self.Trait().Nudge(self, crusher, true); - } - - public void OnCrush(Actor crusher) - { - Sound.Play(Info.CrushSound, crusher.CenterPosition); - ri.SpawnCorpse(self, Info.CorpseSequence); - self.Kill(crusher); - } - - public bool CrushableBy(string[] crushClasses, Player crushOwner) - { - if (crushOwner.Stances[self.Owner] == Stance.Ally) - return false; - - return Info.CrushClasses.Intersect(crushClasses).Any(); - } - } -} diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 279ac6de3e..0073e0ac83 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -209,7 +209,7 @@ - + @@ -331,6 +331,7 @@ + diff --git a/OpenRA.Mods.RA/Render/RenderInfantry.cs b/OpenRA.Mods.RA/Render/RenderInfantry.cs index c6211e4f47..e6786db3e6 100644 --- a/OpenRA.Mods.RA/Render/RenderInfantry.cs +++ b/OpenRA.Mods.RA/Render/RenderInfantry.cs @@ -21,10 +21,8 @@ namespace OpenRA.Mods.RA.Render { public readonly int MinIdleWaitTicks = 30; public readonly int MaxIdleWaitTicks = 110; - public readonly bool SpawnsCorpse = true; public readonly string MoveAnimation = "run"; public readonly string AttackAnimation = "shoot"; - public readonly string DeathAnimationPrefix = "die"; public readonly string[] IdleAnimations = { }; public readonly string[] StandAnimations = { "stand" }; @@ -48,7 +46,7 @@ namespace OpenRA.Mods.RA.Render } } - public class RenderInfantry : RenderSimple, INotifyAttack, INotifyKilled, INotifyIdle + public class RenderInfantry : RenderSimple, INotifyAttack, INotifyIdle { readonly RenderInfantryInfo info; readonly IMove move; @@ -151,29 +149,6 @@ namespace OpenRA.Mods.RA.Render } } - // TODO: Possibly move this into a separate trait - public void Killed(Actor self, AttackInfo e) - { - // Killed by some non-standard means - if (e.Warhead == null) - return; - - if (info.SpawnsCorpse) - { - SpawnCorpse(self, info.DeathAnimationPrefix + (e.Warhead.DeathType)); - } - } - - public void SpawnCorpse(Actor self, string sequence) - { - self.World.AddFrameEndTask(w => - { - if (!self.Destroyed) - w.Add(new Corpse(w, self.CenterPosition, GetImage(self), - sequence, info.PlayerPalette + self.Owner.InternalName)); - }); - } - enum AnimationState { Idle, diff --git a/OpenRA.Mods.RA/Render/WithDeathAnimation.cs b/OpenRA.Mods.RA/Render/WithDeathAnimation.cs new file mode 100644 index 0000000000..c1ec7aeeb3 --- /dev/null +++ b/OpenRA.Mods.RA/Render/WithDeathAnimation.cs @@ -0,0 +1,75 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using System.Linq; +using OpenRA.Mods.RA.Effects; +using OpenRA.Mods.RA.Render; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA.Render +{ + [Desc("This actor has a death animation.")] + public class WithDeathAnimationInfo : ITraitInfo, Requires + { + [Desc("Sequence to play when this actor is killed by a warhead.")] + public readonly string DeathSequence = "die"; + public readonly string DeathSequencePalette = "player"; + [Desc("Custom death animation palette is a player palette BaseName")] + public readonly bool DeathPaletteIsPlayerPalette = true; + [Desc("Should DeathType-specific sequences be used (sequence name = DeathSequence + DeathType).")] + public readonly bool UseDeathTypeSuffix = true; + [Desc("Sequence to play when this actor is crushed.")] + public readonly string CrushedSequence = "die-crushed"; + public readonly string CrushedSequencePalette = "effect"; + [Desc("Custom crushed animation palette is a player palette BaseName")] + public readonly bool CrushedPaletteIsPlayerPalette = false; + + public object Create(ActorInitializer init) { return new WithDeathAnimation(init.self, this); } + } + + public class WithDeathAnimation : INotifyKilled + { + public readonly WithDeathAnimationInfo Info; + readonly RenderSimple renderSimple; + + public WithDeathAnimation(Actor self, WithDeathAnimationInfo info) + { + Info = info; + renderSimple = self.Trait(); + } + + public void Killed(Actor self, AttackInfo e) + { + // Killed by some non-standard means. This includes being crushed + // by a vehicle (Actors with Crushable trait will spawn CrushedSequence instead). + if (e.Warhead == null) + return; + + var sequence = Info.DeathSequence; + if (Info.UseDeathTypeSuffix) + sequence += e.Warhead.DeathType; + + var palette = Info.DeathSequencePalette; + if (Info.DeathPaletteIsPlayerPalette) + palette += self.Owner.InternalName; + + SpawnDeathAnimation(self, sequence, palette); + } + + public void SpawnDeathAnimation(Actor self, string sequence, string palette) + { + self.World.AddFrameEndTask(w => + { + if (!self.Destroyed) + w.Add(new Corpse(w, self.CenterPosition, renderSimple.GetImage(self), sequence, palette)); + }); + } + } +} diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs index e5109c0c9c..692033723b 100644 --- a/OpenRA.Utility/UpgradeRules.cs +++ b/OpenRA.Utility/UpgradeRules.cs @@ -477,11 +477,9 @@ namespace OpenRA.Utility // InfDeath was renamed to DeathType if (engineVersion < 20140830) { - if (depth == 1 && parentKey.StartsWith("DeathSounds")) - { - if (depth == 2 && node.Key == "InfDeaths") - node.Key = "DeathTypes"; - } + + if (depth == 2 && parentKey.StartsWith("DeathSounds") && node.Key == "InfDeaths") + node.Key = "DeathTypes"; if (depth == 2 && parentKey == "SpawnsViceroid" && node.Key == "InfDeath") node.Key = "DeathType"; @@ -527,6 +525,28 @@ namespace OpenRA.Utility node.Key = "ValidTargets"; } + // Added WithDeathAnimation + if (engineVersion < 20140913) + { + var spawnsCorpseRemoval = node.Value.Nodes.FirstOrDefault(n => n.Key == "SpawnsCorpse"); + + if (depth == 0 && node.Value.Nodes.Any(n => n.Key.StartsWith("RenderInfantry")) && spawnsCorpseRemoval == null) + node.Value.Nodes.Add(new MiniYamlNode("WithDeathAnimation", new MiniYaml(""))); + + if (depth == 2 && node.Key == "SpawnsCorpse" && parentKey == "RenderInfantry") + node.Value.Nodes.Remove(spawnsCorpseRemoval); + + // CrushableInfantry renamed to Crushable + if (depth == 1) + { + if (node.Key == "CrushableInfantry") + node.Key = "Crushable"; + + if (node.Key == "-CrushableInfantry") + node.Key = "-Crushable"; + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 0d78cbb8f8..703f58ae95 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -153,6 +153,7 @@ TakeCover: SpeedModifier: 60 RenderInfantry: + WithDeathAnimation: AttackMove: Passenger: CargoType: Infantry @@ -164,7 +165,7 @@ ActorLostNotification: SpawnViceroid: Probability: 10 - CrushableInfantry: + Crushable: WarnProbability: 67 CrushSound: squish2.aud CombatDebugOverlay: @@ -197,7 +198,6 @@ Inherits: ^Infantry -AutoTarget: -TakeCover: - RenderInfantry: AppearsOnRadar: SelectionDecorations: Selectable: @@ -220,7 +220,7 @@ Notification: CivilianKilled NotifyAll: true ScaredyCat: - CrushableInfantry: + Crushable: CrushSound: squish2.aud ^DINO: @@ -257,6 +257,8 @@ GivesExperience: RenderInfantry: Palette: terrain + WithDeathAnimation: + UseDeathTypeSuffix: false EditorAppearance: UseTerrainPalette: true BodyOrientation: diff --git a/mods/cnc/rules/infantry.yaml b/mods/cnc/rules/infantry.yaml index 76fd38fcb6..e72b4a6904 100644 --- a/mods/cnc/rules/infantry.yaml +++ b/mods/cnc/rules/infantry.yaml @@ -228,6 +228,9 @@ STEG: Description: A large, heavily built, herbivorous quadruped Armament: Weapon: tail + WithDeathAnimation: + DeathSequencePalette: terrain + DeathPaletteIsPlayerPalette: false TREX: Inherits: ^DINO diff --git a/mods/cnc/sequences/funpark.yaml b/mods/cnc/sequences/funpark.yaml index a2e280c35d..9f2808266b 100644 --- a/mods/cnc/sequences/funpark.yaml +++ b/mods/cnc/sequences/funpark.yaml @@ -13,22 +13,7 @@ steg: Start: 80 Length: 12 Facings: 8 - die1: - Start: 176 - Length: 22 - die2: - Start: 176 - Length: 22 - die3: - Start: 176 - Length: 22 - die4: - Start: 176 - Length: 22 - die5: - Start: 176 - Length: 22 - die6: + die: Start: 176 Length: 22 icon: stegicnh @@ -49,22 +34,7 @@ trex: Start: 80 Length: 8 Facings: 8 - die1: - Start: 144 - Length: 40 - die2: - Start: 144 - Length: 40 - die3: - Start: 144 - Length: 40 - die4: - Start: 144 - Length: 40 - die5: - Start: 144 - Length: 40 - die6: + die: Start: 144 Length: 40 icon: trexicnh @@ -85,22 +55,7 @@ tric: Start: 80 Length: 12 Facings: 8 - die1: - Start: 176 - Length: 20 - die2: - Start: 176 - Length: 20 - die3: - Start: 176 - Length: 20 - die4: - Start: 176 - Length: 20 - die5: - Start: 176 - Length: 20 - die6: + die: Start: 176 Length: 20 icon: tricicnh @@ -121,22 +76,7 @@ rapt: Start: 80 Length: 8 Facings: 8 - die1: - Start: 144 - Length: 40 - die2: - Start: 144 - Length: 40 - die3: - Start: 144 - Length: 40 - die4: - Start: 144 - Length: 40 - die5: - Start: 144 - Length: 40 - die6: + die: Start: 144 Length: 40 icon: rapticnh diff --git a/mods/cnc/sequences/infantry.yaml b/mods/cnc/sequences/infantry.yaml index 9b0014155f..ac22b42387 100644 --- a/mods/cnc/sequences/infantry.yaml +++ b/mods/cnc/sequences/infantry.yaml @@ -171,6 +171,7 @@ e1: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 icon: e1icnh Start: 0 @@ -260,6 +261,7 @@ e2: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 icon: e2icnh Start: 0 @@ -349,6 +351,7 @@ e3: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 icon: e3icnh Start: 0 @@ -438,6 +441,7 @@ e4: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 muzzle0: flame-n Start: 0 Length: * @@ -559,6 +563,7 @@ e5: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 muzzle0: chem-n Start: 0 Length: * @@ -672,6 +677,7 @@ e6: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 icon: e6icnh Start: 0 @@ -765,5 +771,6 @@ rmbo: Start: 16 Length: 4 Tick: 1600 + ZOffset: -511 icon: rmboicnh Start: 0 \ No newline at end of file diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 5fca94213b..cb8c86655b 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -172,6 +172,7 @@ TargetTypes: Ground RenderInfantry: TakeCover: + WithDeathAnimation: AutoTarget: AttackMove: Passenger: @@ -185,7 +186,7 @@ ProximityCaptor: Types: Infantry GivesBounty: - CrushableInfantry: + Crushable: CrushSound: CRUSH1.WAV RepairableNear: Buildings: barra, barro diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index e3bd6a2a34..7b85139ba5 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -139,6 +139,7 @@ TargetableUnit: TargetTypes: Ground, Infantry, Disguise RenderInfantry: + WithDeathAnimation: AutoTarget: AttackMove: Passenger: @@ -153,7 +154,7 @@ GivesBounty: GpsDot: String: Infantry - CrushableInfantry: + Crushable: CrushSound: squishy2.aud UpdatesPlayerStatistics: CombatDebugOverlay: diff --git a/mods/ra/rules/infantry.yaml b/mods/ra/rules/infantry.yaml index f26f89ae69..5ebfde2c86 100644 --- a/mods/ra/rules/infantry.yaml +++ b/mods/ra/rules/infantry.yaml @@ -566,4 +566,6 @@ Ant: AttackFrontal: Armament: Weapon: mandible + WithDeathAnimation: + UseDeathTypeSuffix: false diff --git a/mods/ra/sequences/infantry.yaml b/mods/ra/sequences/infantry.yaml index 849b87b42d..99c8b450a8 100644 --- a/mods/ra/sequences/infantry.yaml +++ b/mods/ra/sequences/infantry.yaml @@ -64,6 +64,7 @@ e1: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 garrison-muzzle: minigun Start: 0 Length: 6 @@ -136,6 +137,7 @@ sniper: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 garrison-muzzle: minigun Start: 0 Length: 3 @@ -190,6 +192,7 @@ e3: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 144 Length: 4 @@ -248,6 +251,7 @@ e6: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 82 Length: 4 @@ -310,6 +314,7 @@ medi: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 130 Length: 4 @@ -372,6 +377,7 @@ mech: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 130 Length: 4 @@ -430,6 +436,7 @@ e2: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 240 Length: 4 @@ -488,6 +495,7 @@ dog: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 shoot: dogbullt Start: 0 Length: 4 @@ -541,6 +549,7 @@ spy: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 144 Length: 4 @@ -591,6 +600,7 @@ thf: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 crawl: Start: 72 Length: 4 @@ -632,6 +642,7 @@ hijacker: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 crawl: thf Start: 72 Length: 4 @@ -685,6 +696,7 @@ e7: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 128 Length: 4 @@ -752,6 +764,7 @@ e4: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 prone-stand: Start: 208 Length: 4 @@ -826,6 +839,7 @@ gnrl: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 shok: stand: @@ -893,6 +907,7 @@ shok: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 icon: shokicon Start: 0 @@ -937,6 +952,7 @@ c1: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 run: Start: 56 Length: 6 @@ -984,6 +1000,7 @@ c2: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 run: Start: 56 Length: 6 @@ -1031,6 +1048,7 @@ c3: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 run: Start: 56 Length: 6 @@ -1079,6 +1097,7 @@ einstein: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 delphi: stand: @@ -1122,6 +1141,7 @@ delphi: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 chan: stand: @@ -1165,6 +1185,7 @@ chan: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 zombie: stand: @@ -1207,6 +1228,7 @@ zombie: Start: 0 Length: 6 Tick: 1600 + ZOffset: -511 icon: zombicon Start: 0 @@ -1225,33 +1247,14 @@ ant: Start: 72 Length: 4 Facings: 8 - die1: - Start: 104 - Length: 8 - Tick: 300 - die2: - Start: 104 - Length: 8 - Tick: 300 - die3: - Start: 104 - Length: 8 - Tick: 300 - die4: - Start: 104 - Length: 8 - Tick: 300 - die5: - Start: 104 - Length: 8 - Tick: 300 - die6: + die: Start: 104 Length: 8 Tick: 300 die-crushed: Start: 104 Length: 8 - Tick: 300 + Tick: 400 + ZOffset: -511 icon: anticon - Start: 0 \ No newline at end of file + Start: 0 diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 3294c031b6..11021d52bd 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -108,6 +108,7 @@ TargetableUnit: TargetTypes: Ground RenderInfantry: + WithDeathAnimation: AutoTarget: AttackMove: Passenger: @@ -129,7 +130,7 @@ ProximityCaptor: Types: Infantry GivesBounty: - CrushableInfantry: + Crushable: CrushSound: squish6.aud PoisonedByTiberium: SpawnViceroid: diff --git a/mods/ts/rules/infantry.yaml b/mods/ts/rules/infantry.yaml index a1ea5e7d01..2c0e29d4f4 100644 --- a/mods/ts/rules/infantry.yaml +++ b/mods/ts/rules/infantry.yaml @@ -93,7 +93,7 @@ WEEDGUY: Speed: 42 Health: HP: 130 - CrushableInfantry: + Crushable: CrushSound: squishy2.aud Armament: Weapon: FireballLauncher @@ -120,7 +120,7 @@ MEDIC: Speed: 56 Health: HP: 125 - CrushableInfantry: + Crushable: CrushSound: squishy2.aud Armament: Weapon: Heal @@ -220,7 +220,7 @@ GHOST: Armament: Weapon: LtRail LocalOffset: 85,0,384 - CrushableInfantry: + Crushable: CrushSound: squishy2.aud AttackFrontal: C4Demolition: @@ -254,7 +254,7 @@ JUMPJET: Range: 6c0 Armament: Weapon: JumpCannon - -CrushableInfantry: + -Crushable: AttackFrontal: TakeCover: RenderInfantry: @@ -302,7 +302,7 @@ CYBORG: Queue: Infantry BuildPaletteOrder: 50 Owner: nod - -CrushableInfantry: + -Crushable: Selectable: Bounds: 14,30,0,-7 Voice: Cyborg @@ -335,7 +335,7 @@ CYC2: Queue: Infantry BuildPaletteOrder: 50 Owner: nod - -CrushableInfantry: + -Crushable: Selectable: Bounds: 14,30,0,-7 Voice: CyborgCommando @@ -595,7 +595,7 @@ VISSML: Mobile: Speed: 113 ROT: 16 - -CrushableInfantry: + -Crushable: Selectable: Voice: Fiend TargetableUnit: @@ -625,7 +625,7 @@ VISLRG: Mobile: Speed: 113 ROT: 16 - -CrushableInfantry: + -Crushable: Selectable: Voice: Fiend TargetableUnit: diff --git a/mods/ts/rules/vehicles.yaml b/mods/ts/rules/vehicles.yaml index 573fd178eb..cb6d3746ea 100644 --- a/mods/ts/rules/vehicles.yaml +++ b/mods/ts/rules/vehicles.yaml @@ -509,7 +509,6 @@ MMCH: RevealsShroud: Range: 8c0 RenderInfantry: - SpawnsCorpse: false Turreted: ROT: 5 AttackTurreted: @@ -581,7 +580,6 @@ SMECH: Armament: Weapon: AssaultCannon RenderInfantry: - SpawnsCorpse: false Selectable: Voices: Mech Bounds: 16, 32 diff --git a/mods/ts/sequences/infantry.yaml b/mods/ts/sequences/infantry.yaml index 26130fbda1..7da2bf6246 100644 --- a/mods/ts/sequences/infantry.yaml +++ b/mods/ts/sequences/infantry.yaml @@ -45,6 +45,12 @@ e1: Start: 0 Length: * Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -122,6 +128,12 @@ e2: Start: 0 Length: * Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -199,6 +211,12 @@ e3: Start: 0 Length: * Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -267,19 +285,19 @@ weedguy: Facings: 8 Stride: 6 ShadowStart: 288 - die2: weed - Start: 160 - Length: 6 - ShadowStart: 362 - Tick: 80 die1: weed Start: 149 Length: 11 ShadowStart: 351 Tick: 80 + die2: weed + Start: 160 + Length: 6 + ShadowStart: 362 + Tick: 80 die3: weed Start: 166 - Length: 10 + Length: 11 ShadowStart: 368 Tick: 80 die4: weed @@ -296,6 +314,11 @@ weedguy: Start: 0 Length: * Tick: 80 + die-crushed: weed + Start: 174 + Length: 3 + ShadowStart: 376 + Tick: 1000 icon: weaticon Start: 0 @@ -347,6 +370,12 @@ medic: Length: 15 ShadowStart: 455 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -427,6 +456,12 @@ engineer: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 standup-0: Start: 260 Length: 2 @@ -493,6 +528,12 @@ umagon: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -571,6 +612,12 @@ ghost: # TODO unused GUNFIRE.SHP Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -647,6 +694,12 @@ jumpjet: # TODO: ShadowStart: Length: 15 ShadowStart: 887 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -725,6 +778,12 @@ mhijack: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -803,6 +862,12 @@ chamspy: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1036,6 +1101,12 @@ mutant: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1114,6 +1185,12 @@ mwmn: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1192,6 +1269,12 @@ mutant3: # TODO unused MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN- Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1270,6 +1353,12 @@ tratos: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1348,6 +1437,12 @@ oxanna: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1426,6 +1521,12 @@ slav: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 shoot: Start: 164 Length: 6 @@ -1482,6 +1583,12 @@ doggie: # TODO: not sure what frame 88 and following is Length: 10 ShadowStart: 218 Tick: 80 + die-crushed: + Start: 105 + Length: 4 + ShadowStart: 224 + Tick: 800 + ZOffset: -511 shoot: Start: 56 Length: 4 @@ -1566,6 +1673,12 @@ civ1: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 die5: flameguy # TODO: walking animation unused Start: 42 Length: 104 @@ -1622,6 +1735,12 @@ civ2: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 die5: flameguy # TODO: walking animation unused Start: 42 Length: 104 @@ -1678,6 +1797,12 @@ civ3: Length: 15 ShadowStart: 441 Tick: 80 + die-crushed: + Start: 159 + Length: 5 + ShadowStart: 451 + Tick: 800 + ZOffset: -511 die5: flameguy # TODO: walking animation unused Start: 42 Length: 104