Fixed bug where a ship was apparently attacking itself whenever one of its subentities was taking energy damage.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4510 127b21dd-08f5-0310-b4b7-95ae10353056
master
Nikos Barkas 2011-04-12 12:22:57 +00:00
parent ffd1ab6603
commit cfb54ae6c7
1 changed files with 3 additions and 3 deletions

View File

@ -7587,7 +7587,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
if (subent && [victim isFrangible])
{
// do 1% bleed-through damage...
[victim takeEnergyDamage: 0.01 * weapon_damage from:subent becauseOf: parent];
[victim takeEnergyDamage: 0.01 * weapon_damage from:self becauseOf: parent];
victim = subent;
}
@ -7649,7 +7649,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
if (subent != nil && [victim isFrangible])
{
// do 1% bleed-through damage...
[victim takeEnergyDamage: 0.01 * weapon_damage from:subent becauseOf:self];
[victim takeEnergyDamage: 0.01 * weapon_damage from:self becauseOf:self];
victim = subent;
}
@ -7726,7 +7726,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
if (subent != nil && [victim isFrangible])
{
// do 1% bleed-through damage...
[victim takeEnergyDamage: 0.01 * weapon_damage from:subent becauseOf:self];
[victim takeEnergyDamage: 0.01 * weapon_damage from:self becauseOf:self];
victim = subent;
}