Fixed bug where throw_sparks would not be reset when a ship entity was created anew. Now throw_sparks is set up according to the shipdata.plist key throw_sparks and defaults to NO if such key is not specified.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2186 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Nikos Barkas 2009-05-28 14:31:20 +00:00
parent 6cc1fe5117
commit 4fbde7c793
2 changed files with 6 additions and 0 deletions

View File

@ -1037,6 +1037,9 @@ static PlayerEntity *sSharedPlayer = nil;
energy_recharge_rate = [shipDict floatForKey:@"energy_recharge_rate" defaultValue:energy_recharge_rate];
energy = maxEnergy;
// Each new ship should start in seemingly good operating condition, unless specifically told not to
[self setThrowSparks:[shipDict boolForKey:@"throw_sparks" defaultValue:NO]];
forward_weapon_type = StringToWeaponType([shipDict stringForKey:@"forward_weapon_type" defaultValue:@"WEAPON_NONE"]);
aft_weapon_type = StringToWeaponType([shipDict stringForKey:@"aft_weapon_type" defaultValue:@"WEAPON_NONE"]);
[self setWeaponDataFromType:forward_weapon_type];

View File

@ -210,6 +210,9 @@ static NSString * const kOOLogEntityBehaviourChanged = @"entity.behaviour.change
canFragment = [shipDict fuzzyBooleanForKey:@"fragment_chance" defaultValue:0.9];
// Each new ship should start in seemingly good operating condition, unless specifically told not to
[self setThrowSparks:[shipDict boolForKey:@"throw_sparks" defaultValue:NO]];
cloaking_device_active = NO;
military_jammer_active = NO;