Minor cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2931 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
cc8fcefa44
commit
bdddd2eccd
@ -5678,7 +5678,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
ParticleEntity *fragment;
|
||||
OOCargoQuantity n_cargo = (ranrot_rand() % (likely_cargo + 1));
|
||||
OOCargoQuantity cargo_to_go;
|
||||
|
||||
|
||||
if ([self status] == STATUS_DEAD) return;
|
||||
[self setStatus:STATUS_DEAD];
|
||||
|
||||
@ -5689,7 +5689,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
[[PlayerEntity sharedPlayer] setScriptTarget:self];
|
||||
[self doScriptEvent:@"shipDied"]; // FIXME: params missing
|
||||
}
|
||||
|
||||
|
||||
// two parts to the explosion:
|
||||
// 1. fast sparks
|
||||
float how_many = factor;
|
||||
@ -5709,8 +5709,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
|
||||
[fragment release];
|
||||
how_many -= 1.0f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// we need to throw out cargo at this point.
|
||||
unsigned cargo_chance = 10;
|
||||
if ([[name lowercaseString] rangeOfString:@"medical"].location != NSNotFound)
|
||||
|
@ -4288,7 +4288,7 @@ static BOOL MaintainLinkedLists(Universe* uni)
|
||||
|
||||
- (BOOL) removeEntity:(Entity *) entity
|
||||
{
|
||||
if (entity)
|
||||
if (entity != nil && ![entity isPlayer])
|
||||
{
|
||||
/* Ensure entity won't actually be dealloced until the end of this
|
||||
update (or the next update if none is in progress), because
|
||||
@ -5541,7 +5541,7 @@ OOINLINE BOOL EntityInRange(Vector p1, Entity *e2, float range)
|
||||
#ifndef NDEBUG
|
||||
update_stage = [NSString stringWithFormat:@"update:entity[%@]", [thing shortDescription]];
|
||||
#endif
|
||||
if (![thing isPlayer] && EXPECT_NOT([thing status] == STATUS_DEAD && ![entitiesDeadThisUpdate containsObject:thing]))
|
||||
if (EXPECT_NOT([thing status] == STATUS_DEAD && ![entitiesDeadThisUpdate containsObject:thing] && ![thing isPlayer]))
|
||||
{
|
||||
if (zombies == nil) zombies = [NSMutableSet set];
|
||||
[zombies addObject:thing];
|
||||
|
Loading…
x
Reference in New Issue
Block a user