Merge pull request #11396 from Mailaender/sync-projectiles
Speed up sync by only syncing projectiles
This commit is contained in:
@@ -152,7 +152,6 @@
|
||||
<Compile Include="Effects\CrateEffect.cs" />
|
||||
<Compile Include="Effects\FlashTarget.cs" />
|
||||
<Compile Include="Effects\FloatingText.cs" />
|
||||
<Compile Include="Effects\NukeLaunch.cs" />
|
||||
<Compile Include="Effects\PowerdownIndicator.cs" />
|
||||
<Compile Include="Effects\RallyPointIndicator.cs" />
|
||||
<Compile Include="Effects\RepairIndicator.cs" />
|
||||
@@ -162,6 +161,7 @@
|
||||
<Compile Include="Projectiles\GravityBomb.cs" />
|
||||
<Compile Include="Projectiles\LaserZap.cs" />
|
||||
<Compile Include="Projectiles\Missile.cs" />
|
||||
<Compile Include="Projectiles\NukeLaunch.cs" />
|
||||
<Compile Include="Commands\ChatCommands.cs" />
|
||||
<Compile Include="Commands\DevCommands.cs" />
|
||||
<Compile Include="Commands\HelpCommand.cs" />
|
||||
|
||||
@@ -69,14 +69,14 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
[Desc("Beam color is the player's color.")]
|
||||
public readonly bool UsePlayerColor = false;
|
||||
|
||||
public IEffect Create(ProjectileArgs args)
|
||||
public IProjectile Create(ProjectileArgs args)
|
||||
{
|
||||
var c = UsePlayerColor ? args.SourceActor.Owner.Color.RGB : Color;
|
||||
return new AreaBeam(this, args, c);
|
||||
}
|
||||
}
|
||||
|
||||
public class AreaBeam : IEffect, ISync
|
||||
public class AreaBeam : IProjectile, ISync
|
||||
{
|
||||
readonly AreaBeamInfo info;
|
||||
readonly ProjectileArgs args;
|
||||
|
||||
@@ -82,10 +82,10 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
public readonly int ContrailDelay = 1;
|
||||
public readonly WDist ContrailWidth = new WDist(64);
|
||||
|
||||
public IEffect Create(ProjectileArgs args) { return new Bullet(this, args); }
|
||||
public IProjectile Create(ProjectileArgs args) { return new Bullet(this, args); }
|
||||
}
|
||||
|
||||
public class Bullet : IEffect, ISync
|
||||
public class Bullet : IProjectile, ISync
|
||||
{
|
||||
readonly BulletInfo info;
|
||||
readonly ProjectileArgs args;
|
||||
|
||||
@@ -39,10 +39,10 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
[Desc("Value added to speed every tick.")]
|
||||
public readonly WDist Acceleration = new WDist(15);
|
||||
|
||||
public IEffect Create(ProjectileArgs args) { return new GravityBomb(this, args); }
|
||||
public IProjectile Create(ProjectileArgs args) { return new GravityBomb(this, args); }
|
||||
}
|
||||
|
||||
public class GravityBomb : IEffect, ISync
|
||||
public class GravityBomb : IProjectile, ISync
|
||||
{
|
||||
readonly GravityBombInfo info;
|
||||
readonly Animation anim;
|
||||
|
||||
@@ -47,14 +47,14 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
|
||||
[PaletteReference] public readonly string HitAnimPalette = "effect";
|
||||
|
||||
public IEffect Create(ProjectileArgs args)
|
||||
public IProjectile Create(ProjectileArgs args)
|
||||
{
|
||||
var c = UsePlayerColor ? args.SourceActor.Owner.Color.RGB : Color;
|
||||
return new LaserZap(args, this, c);
|
||||
}
|
||||
}
|
||||
|
||||
public class LaserZap : IEffect
|
||||
public class LaserZap : IProjectile
|
||||
{
|
||||
readonly ProjectileArgs args;
|
||||
readonly LaserZapInfo info;
|
||||
|
||||
@@ -141,11 +141,11 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
"not trigger fast enough, causing the missile to fly past the target.")]
|
||||
public readonly WDist CloseEnough = new WDist(298);
|
||||
|
||||
public IEffect Create(ProjectileArgs args) { return new Missile(this, args); }
|
||||
public IProjectile Create(ProjectileArgs args) { return new Missile(this, args); }
|
||||
}
|
||||
|
||||
// TODO: double check square roots!!!
|
||||
public class Missile : IEffect, ISync
|
||||
public class Missile : IProjectile, ISync
|
||||
{
|
||||
enum States
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Effects
|
||||
{
|
||||
public class NukeLaunch : IEffect
|
||||
public class NukeLaunch : IProjectile
|
||||
{
|
||||
readonly Player firedBy;
|
||||
readonly Animation anim;
|
||||
Reference in New Issue
Block a user