diff --git a/OpenRA.Game/Combat.cs b/OpenRA.Game/Combat.cs index 3e0518e903..fc223aca98 100644 --- a/OpenRA.Game/Combat.cs +++ b/OpenRA.Game/Combat.cs @@ -97,7 +97,9 @@ namespace OpenRA public static bool WeaponValidForTarget(WeaponInfo weapon, Actor target) { - var projectile = Rules.ProjectileInfo[weapon.Projectile]; + return true; // massive hack, and very wrong. + + /*var projectile = Rules.ProjectileInfo[weapon.Projectile]; var warhead = Rules.WarheadInfo[weapon.Warhead]; var unit = target.traits.GetOrDefault(); @@ -113,7 +115,7 @@ namespace OpenRA if (projectile.UnderWater && !target.Info.Traits.Get().WaterBound) return false; - return projectile.AG; + return projectile.AG;*/ } public static bool HasAnyValidWeapons(Actor self, Actor target) diff --git a/OpenRA.Game/Effects/NukeLaunch.cs b/OpenRA.Game/Effects/NukeLaunch.cs index 112022e9bd..3553e35727 100644 --- a/OpenRA.Game/Effects/NukeLaunch.cs +++ b/OpenRA.Game/Effects/NukeLaunch.cs @@ -33,7 +33,6 @@ namespace OpenRA.Effects class NukeLaunch : IEffect { - readonly ProjectileInfo projectileUp, projectileDown; readonly Actor silo; Animation anim; float2 pos; @@ -48,11 +47,8 @@ namespace OpenRA.Effects this.silo = silo; this.targetLocation = targetLocation; this.weapon = Rules.WeaponInfo[weapon]; - projectileUp = Rules.ProjectileInfo["NukeUp"]; - projectileDown = Rules.ProjectileInfo["NukeDown"]; - - anim = new Animation(projectileUp.Image); - anim.PlayRepeating("idle"); + anim = new Animation("nuke"); + anim.PlayRepeating("up"); pos = silo.CenterLocation; } @@ -66,8 +62,8 @@ namespace OpenRA.Effects if (altitude >= targetAltitude) { pos = OpenRA.Traits.Util.CenterOfCell(targetLocation); - anim = new Animation(projectileDown.Image); - anim.PlayRepeating("idle"); + anim = new Animation("nuke"); + anim.PlayRepeating("down"); goingUp = false; } } @@ -82,7 +78,7 @@ namespace OpenRA.Effects void Explode(World world) { world.AddFrameEndTask(w => w.Remove(this)); - var warhead = Rules.WarheadInfo[weapon.Warhead]; + //var warhead = Rules.WarheadInfo[weapon.Warhead]; //Combat.DoImpact(pos.ToInt2(), pos.ToInt2(), weapon, Rules.ProjectileInfo[weapon.Projectile], warhead, silo, true); world.WorldActor.traits.Get().AddEffect(20, pos, 5); } diff --git a/OpenRA.Game/GameRules/ProjectileInfo.cs b/OpenRA.Game/GameRules/ProjectileInfo.cs deleted file mode 100644 index ec60bb164a..0000000000 --- a/OpenRA.Game/GameRules/ProjectileInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. - * This file is part of OpenRA. - * - * OpenRA is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * OpenRA is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with OpenRA. If not, see . - */ -#endregion - -namespace OpenRA.GameRules -{ - public class ProjectileInfo - { - public readonly bool AA = false; - public readonly bool AG = true; - public readonly bool ASW = false; - public readonly bool Arcing = false; - public readonly int Arm = 0; - public readonly bool Degenerates = false; - public readonly bool High = false; - public readonly string Image = null; - public readonly bool Inaccurate = false; - public readonly bool Parachuted = false; - public readonly bool Proximity = false; - public readonly int ROT = 0; - public readonly bool Shadow = true; - public readonly bool UnderWater = false; - public readonly int RangeLimit = 0; - - // OpenRA-specific: - public readonly string Trail = null; - } -} diff --git a/OpenRA.Game/GameRules/Rules.cs b/OpenRA.Game/GameRules/Rules.cs index cba40800be..640f61c027 100755 --- a/OpenRA.Game/GameRules/Rules.cs +++ b/OpenRA.Game/GameRules/Rules.cs @@ -32,7 +32,6 @@ namespace OpenRA public static Dictionary> Categories = new Dictionary>(); public static InfoLoader WeaponInfo; public static InfoLoader WarheadInfo; - public static InfoLoader ProjectileInfo; public static InfoLoader VoiceInfo; public static TechTree TechTree; @@ -55,8 +54,6 @@ namespace OpenRA Pair.New>("Weapon", _ => new WeaponInfo())); WarheadInfo = new InfoLoader( Pair.New>("Warhead", _ => new WarheadInfo())); - ProjectileInfo = new InfoLoader( - Pair.New>("Projectile", _ => new ProjectileInfo())); VoiceInfo = new InfoLoader( Pair.New>("Voice", _ => new VoiceInfo())); diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 26f1317686..3a98564aa4 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -154,7 +154,6 @@ -