From 650a0c333ae740bbc38966c92385bab4b7e20e5e Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 13:23:40 +1300 Subject: [PATCH 1/6] fixes harvester lockup bug --- OpenRa.Game/Traits/Activities/Move.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRa.Game/Traits/Activities/Move.cs b/OpenRa.Game/Traits/Activities/Move.cs index a1cfb0655c..e92863fea2 100755 --- a/OpenRa.Game/Traits/Activities/Move.cs +++ b/OpenRa.Game/Traits/Activities/Move.cs @@ -81,7 +81,7 @@ namespace OpenRa.Game.Traits.Activities var nextCell = PopPath( self, mobile ); if( nextCell == null ) - return NextActivity; + return this; int2 dir = nextCell.Value - mobile.fromCell; var firstFacing = Util.GetFacing( dir, unit.Facing ); From c5c1ec79abb28e79198eebe7624d824dd2a46c95 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 13:31:08 +1300 Subject: [PATCH 2/6] presence of the trait is enough; don't need to check a legacy flag too. --- OpenRa.Game/GameRules/UnitInfo.cs | 2 -- OpenRa.Game/OpenRa.Game.csproj | 2 +- .../Traits/{Infantry.cs => SquishByTank.cs} | 5 ++--- units.ini | 18 +++++++++--------- 4 files changed, 12 insertions(+), 15 deletions(-) rename OpenRa.Game/Traits/{Infantry.cs => SquishByTank.cs} (80%) diff --git a/OpenRa.Game/GameRules/UnitInfo.cs b/OpenRa.Game/GameRules/UnitInfo.cs index 03aa28886a..180fca4d71 100755 --- a/OpenRa.Game/GameRules/UnitInfo.cs +++ b/OpenRa.Game/GameRules/UnitInfo.cs @@ -68,7 +68,6 @@ namespace OpenRa.Game.GameRules public class InfantryInfo : MobileInfo { - public readonly bool Crushable = true; // also on VehicleInfo, but with a different default public readonly bool C4 = false; public readonly bool FraidyCat = false; public readonly bool Infiltrate = false; @@ -80,7 +79,6 @@ namespace OpenRa.Game.GameRules public class VehicleInfo : MobileInfo { - public readonly bool Crushable = false; public readonly bool Tracked = false; public VehicleInfo(string name) : base(name) { } diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 9540200910..686f62a19d 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -181,7 +181,7 @@ - + diff --git a/OpenRa.Game/Traits/Infantry.cs b/OpenRa.Game/Traits/SquishByTank.cs similarity index 80% rename from OpenRa.Game/Traits/Infantry.cs rename to OpenRa.Game/Traits/SquishByTank.cs index 43200a940a..ed84275899 100644 --- a/OpenRa.Game/Traits/Infantry.cs +++ b/OpenRa.Game/Traits/SquishByTank.cs @@ -5,10 +5,10 @@ using OpenRa.Game.GameRules; namespace OpenRa.Game.Traits { - class Infantry : ICrushable + class SquishByTank : ICrushable { readonly Actor self; - public Infantry(Actor self) + public SquishByTank(Actor self) { this.self = self; } @@ -26,7 +26,6 @@ namespace OpenRa.Game.Traits public bool IsCrushableBy(UnitMovementType umt, Player player) { if (player == Game.LocalPlayer) return false; - if (!(self.Info as InfantryInfo).Crushable) return false; switch (umt) { case UnitMovementType.Track: return true; diff --git a/units.ini b/units.ini index 633e89a442..5869be9b95 100755 --- a/units.ini +++ b/units.ini @@ -528,48 +528,48 @@ Traits=Unit, Mobile, RenderInfantry, Infantry, AutoTarget LongDesc=Anti-infantry unit. Not fooled by the \nSpy's disguise.\n Strong vs Infantry\n Weak vs Vehicles [E1] Description=Rifle Infantry -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget LongDesc=General-purpose infantry. Strong vs Infantry\n Weak vs Vehicles [E2] Description=Grenadier -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget FireDelay=15 PrimaryOffset=0,0,0,-13 LongDesc=Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles [E3] Description=Rocket Soldier -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget PrimaryOffset=0,0,0,-13 LongDesc=Anti-tank/Anti-aircraft infantry.\n Strong vs Tanks, Aircraft\n Weak vs Infantry [E4] Description=Flamethrower -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget FireDelay=8 LongDesc=Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles [E6] Description=Engineer -Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry +Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank Voice=EngineerVoice LongDesc=Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything [SPY] Description=Spy Voice=SpyVoice -Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry +Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank LongDesc=Infiltrates enemy structures to gather \nintelligence. Exact effect depends on the \nbuilding infiltrated.\n Strong vs Nothing\n Weak vs Everything\n Special Ability: Disguised [THF] Description=Thief Voice=ThiefVoice -Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry +Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank LongDesc=Infiltrates enemy refineries & \nsilos, and steals money stored there.\n Unarmed [E7] Description=Tanya Voice=TanyaVoice -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget LongDesc=Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs Infantry, Buildings\n Weak vs Vehicles\n Special Ability: Destroy Building with C4 [MEDI] Description=Medic Voice=MedicVoice -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoHeal +Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoHeal LongDesc=Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything From 0bff615082954648a91e3cbc0e0e4f4223665713 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 14:03:31 +1300 Subject: [PATCH 3/6] fixing some aftermath problems --- .gitignore | 1 + aftermathUnits.ini | 2 +- aftrmath.ini | 1 - sequences-aftermath.xml | 139 ++++++++++++++++++++-------------------- 4 files changed, 72 insertions(+), 71 deletions(-) diff --git a/.gitignore b/.gitignore index 3f4542fb21..cb4ee5998b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ obj # Red Alert binary files *.[mM][iI][xX] +*.[aA][uU][dD] # Crap generated by OpenRa sheet-*.png diff --git a/aftermathUnits.ini b/aftermathUnits.ini index 9e7f248de9..fd9d13dc13 100755 --- a/aftermathUnits.ini +++ b/aftermathUnits.ini @@ -99,7 +99,7 @@ MechVoice [ShokVoice] Select=jchrge1,jjuice1,jjump1,jpower1 Move=jdance1,jyes1 -Attack=jburn,jcrisp1,jshock1,jlight1 +Attack=jburn1,jcrisp1,jshock1,jlight1 [MechVoice] Select=mhowdy1,mhotdig1,mhuh1 diff --git a/aftrmath.ini b/aftrmath.ini index c07491fa0b..db4e05f689 100755 --- a/aftrmath.ini +++ b/aftrmath.ini @@ -134,7 +134,6 @@ Cost=900 Points=15 Explodes=no NoMovingFire=yes -Crushable=no ; field mechanic [MECH] diff --git a/sequences-aftermath.xml b/sequences-aftermath.xml index def95e99bd..911a79510a 100644 --- a/sequences-aftermath.xml +++ b/sequences-aftermath.xml @@ -1,25 +1,11 @@ - + - + - sequence name="deploy-0" start="35" length="5" /> - - - - - - - - - - - - - - - + sequence name="deploy-0" start="35" length="5" /> + @@ -39,56 +25,57 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -99,5 +86,19 @@ + + + + + + + + + + + + + + - + \ No newline at end of file From 500d3e5304c847b031e8a616d4d3738e3d7668d6 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 14:03:48 +1300 Subject: [PATCH 4/6] enable crawling for aftermath infantry --- aftermathUnits.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aftermathUnits.ini b/aftermathUnits.ini index fd9d13dc13..ffec781eb9 100755 --- a/aftermathUnits.ini +++ b/aftermathUnits.ini @@ -54,13 +54,13 @@ MECH [SHOK] Description=Tesla Trooper -Traits=Unit, Mobile, AttackBase, RenderInfantry +Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover SquadSize=1 Voice=ShokVoice [MECH] Description=Mechanic -Traits=Unit, Mobile, AttackBase, RenderInfantry +Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover SquadSize=1 Voice=MechVoice From 4f87f46833517b5615f052662d9a3a87d1832055 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 14:04:11 +1300 Subject: [PATCH 5/6] MECH should be squished by tanks --- aftermathUnits.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aftermathUnits.ini b/aftermathUnits.ini index ffec781eb9..b0599a1ccd 100755 --- a/aftermathUnits.ini +++ b/aftermathUnits.ini @@ -60,7 +60,7 @@ Voice=ShokVoice [MECH] Description=Mechanic -Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover +Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover, SquishByTank SquadSize=1 Voice=MechVoice From 8696273a5c38f5292b579e77a62b1c8e783ffb14 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 14:12:40 +1300 Subject: [PATCH 6/6] important to mount a theater package in sequence editor --- SequenceEditor/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SequenceEditor/Program.cs b/SequenceEditor/Program.cs index 476086d101..aed4c20707 100644 --- a/SequenceEditor/Program.cs +++ b/SequenceEditor/Program.cs @@ -25,7 +25,7 @@ namespace SequenceEditor { if (Shps.ContainsKey(shp)) return; - var reader = new ShpReader(FileSystem.OpenWithExts(shp, ".shp", ".tem", ".sno", ".int")); + var reader = new ShpReader(FileSystem.OpenWithExts(shp, ".tem", ".sno", ".int", ".shp")); Shps[shp] = reader.Select(ih => { var bmp = new Bitmap(reader.Width, reader.Height); @@ -74,6 +74,7 @@ namespace SequenceEditor try { FileSystem.MountDefault( true ); + FileSystem.MountTemporary(new Package("temperat.mix")); } catch( FileNotFoundException fnf ) {