moved weapon report from bullet/missile to attackbase

This commit is contained in:
Chris Forbes
2009-12-13 12:26:49 +13:00
parent edc954cc8a
commit 42bd51f2b0
5 changed files with 4 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRa.Game
ActorID = Game.world.NextAID();
Info = (UnitInfo)info; // temporary
Location = location;
CenterLocation = new float2( 12, 12 ) + Game.CellSize * (float2)Location;
CenterLocation = Traits.Util.CenterOfCell(Location);
Owner = owner;
Health = Info.Strength; /* todo: handle cases where this is not true! */

View File

@@ -50,10 +50,6 @@ namespace OpenRa.Game.Effects
public void Tick()
{
if (t == 0)
if (!string.IsNullOrEmpty(Weapon.Report))
Sound.Play(Weapon.Report + ".aud");
t += 40;
if (t > TotalTime()) /* remove finished bullets */

View File

@@ -50,9 +50,6 @@ namespace OpenRa.Game.Effects
public void Tick()
{
if (t == 0)
Sound.Play(Weapon.Report + ".aud");
t += 40;
Traits.Util.TickFacing(ref Facing,

View File

@@ -94,6 +94,9 @@ namespace OpenRa.Game.Traits
Game.world.Add(new Bullet(weaponName, self.Owner, self,
firePos, target.CenterLocation.ToInt2()));
if (!string.IsNullOrEmpty(weapon.Report))
Sound.Play(weapon.Report + ".aud");
foreach (var na in self.traits.WithInterface<INotifyAttack>())
na.Attacking(self);

View File

@@ -713,7 +713,6 @@ Cost=950
Points=45
ROT=7
Cloakable=yes
Passengers=10 ; cjf hax
; destroyer
[DD]
@@ -782,7 +781,6 @@ Sensors=Yes
Prerequisite=kenn
Primary=DogJaw
Strength=12
;Strength=5
Armor=none
TechLevel=3
Sight=5