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
This commit is contained in:
parent
ffd1ab6603
commit
cfb54ae6c7
@ -7587,7 +7587,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
|||||||
if (subent && [victim isFrangible])
|
if (subent && [victim isFrangible])
|
||||||
{
|
{
|
||||||
// do 1% bleed-through damage...
|
// 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;
|
victim = subent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7649,7 +7649,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
|||||||
if (subent != nil && [victim isFrangible])
|
if (subent != nil && [victim isFrangible])
|
||||||
{
|
{
|
||||||
// do 1% bleed-through damage...
|
// 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;
|
victim = subent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7726,7 +7726,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
|||||||
if (subent != nil && [victim isFrangible])
|
if (subent != nil && [victim isFrangible])
|
||||||
{
|
{
|
||||||
// do 1% bleed-through damage...
|
// 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;
|
victim = subent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user