Fix one "ghost entity" bug. Hopefully this hints at where the others might be.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5640 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
a6e2f76f36
commit
9d23e7b36d
@ -11347,6 +11347,17 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
if (max_cargo && [cargo count] >= [self maxAvailableCargoSpace]) [shipAI message:@"HOLD_FULL"];
|
||||
}
|
||||
[self doScriptEvent:OOJSID("shipScoopedOther") withArgument:other]; // always fire, even without commodity.
|
||||
|
||||
// if shipScoopedOther does something strange to the object, we must
|
||||
// then remove it from the hold, or it will be over-retained
|
||||
if ([other status] != STATUS_IN_HOLD)
|
||||
{
|
||||
if ([cargo containsObject:other])
|
||||
{
|
||||
[cargo removeObject:other];
|
||||
}
|
||||
}
|
||||
|
||||
[[other collisionArray] removeObject:self]; // so it can't be scooped twice!
|
||||
// make sure other ships trying to scoop it lose it
|
||||
// probably already happened, but some may have acquired it
|
||||
|
Loading…
x
Reference in New Issue
Block a user