Slightly improvement to previous commit. Changed method isMissileFlag to isMissileFlagSet to make code a bit more understandable.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2188 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
fc0cdfae2d
commit
03900e7865
@ -677,7 +677,7 @@ BOOL class_masslocks(int some_class);
|
|||||||
- (BOOL) fireLaserShotInDirection: (OOViewID) direction;
|
- (BOOL) fireLaserShotInDirection: (OOViewID) direction;
|
||||||
- (BOOL) firePlasmaShot:(double) offset :(double) speed :(OOColor *) color;
|
- (BOOL) firePlasmaShot:(double) offset :(double) speed :(OOColor *) color;
|
||||||
- (BOOL) fireMissile;
|
- (BOOL) fireMissile;
|
||||||
- (BOOL) isMissileFlag;
|
- (BOOL) isMissileFlagSet;
|
||||||
- (void) setIsMissileFlag:(BOOL)newValue;
|
- (void) setIsMissileFlag:(BOOL)newValue;
|
||||||
- (BOOL) fireECM;
|
- (BOOL) fireECM;
|
||||||
- (BOOL) activateCloakingDevice;
|
- (BOOL) activateCloakingDevice;
|
||||||
|
@ -6517,7 +6517,7 @@ BOOL class_masslocks(int some_class)
|
|||||||
origin.y = position.y + v_right.y * start.x + v_up.y * start.y + v_forward.y * start.z;
|
origin.y = position.y + v_right.y * start.x + v_up.y * start.y + v_forward.y * start.z;
|
||||||
origin.z = position.z + v_right.z * start.x + v_up.z * start.y + v_forward.z * start.z;
|
origin.z = position.z + v_right.z * start.x + v_up.z * start.y + v_forward.z * start.z;
|
||||||
|
|
||||||
if (!isMissile) [missile setOwner:self];
|
if (![self isMissileFlagSet]) [missile setOwner:self];
|
||||||
else [missile setOwner:[self owner]];
|
else [missile setOwner:[self owner]];
|
||||||
|
|
||||||
[missile addTarget:target];
|
[missile addTarget:target];
|
||||||
@ -6546,7 +6546,7 @@ BOOL class_masslocks(int some_class)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (BOOL) isMissileFlag
|
- (BOOL) isMissileFlagSet
|
||||||
{
|
{
|
||||||
return isMissile; // were we created using fireMissile? (for tracking submunitions)
|
return isMissile; // were we created using fireMissile? (for tracking submunitions)
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ extern NSString * const kOOLogNoteAddShips;
|
|||||||
if (spawned != nil)
|
if (spawned != nil)
|
||||||
{
|
{
|
||||||
[spawned setTemperature:[self temperature] * EJECTA_TEMP_FACTOR];
|
[spawned setTemperature:[self temperature] * EJECTA_TEMP_FACTOR];
|
||||||
if (isMissile && [[spawned shipInfoDictionary] boolForKey:@"is_submunition"])
|
if ([self isMissileFlagSet] && [[spawned shipInfoDictionary] boolForKey:@"is_submunition"])
|
||||||
{
|
{
|
||||||
[spawned setOwner:[self owner]];
|
[spawned setOwner:[self owner]];
|
||||||
[spawned addTarget:[self primaryTarget]];
|
[spawned addTarget:[self primaryTarget]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user