Bug 856- Removal of extra few lines of code
This commit is contained in:
committed by
Chris Forbes
parent
de5db51f25
commit
1fa4cf5c0a
@@ -16,23 +16,21 @@ namespace OpenRA.Mods.RA
|
||||
public class LimitedAmmoInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Ammo = 0;
|
||||
public readonly int PipCount = 0;
|
||||
public readonly int PipCount = 0;
|
||||
public readonly int ReloadTicks = 25 * 2; // This is measured in ticks
|
||||
|
||||
public object Create(ActorInitializer init) { return new LimitedAmmo(this); }
|
||||
}
|
||||
|
||||
public class LimitedAmmo : INotifyAttack, IPips, ISync
|
||||
{
|
||||
[Sync]
|
||||
int ammo;
|
||||
int ticksPerAmmo;
|
||||
{
|
||||
[Sync]
|
||||
int ammo;
|
||||
LimitedAmmoInfo Info;
|
||||
|
||||
public LimitedAmmo(LimitedAmmoInfo info)
|
||||
{
|
||||
ammo = info.Ammo;
|
||||
ticksPerAmmo = info.ReloadTicks;
|
||||
ammo = info.Ammo;
|
||||
Info = info;
|
||||
}
|
||||
|
||||
@@ -43,9 +41,9 @@ namespace OpenRA.Mods.RA
|
||||
if (ammo >= Info.Ammo) return false;
|
||||
++ammo;
|
||||
return true;
|
||||
}
|
||||
|
||||
public int ReloadTimePerAmmo() { return ticksPerAmmo; }
|
||||
}
|
||||
|
||||
public int ReloadTimePerAmmo() { return Info.ReloadTicks; }
|
||||
|
||||
public void Attacking(Actor self, Target target) { --ammo; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user