From b62473dc2912c60ef40f26ceacda311cfe46f587 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 1 Apr 2008 23:41:29 +0000 Subject: [PATCH] Game over changes: restart now sets system data properly, and the reset event is now called only once after game over. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1534 127b21dd-08f5-0310-b4b7-95ae10353056 --- src/Core/Universe.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Core/Universe.m b/src/Core/Universe.m index 41ef825a..faf52847 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -2573,6 +2573,9 @@ GLfloat docked_light_specular[4] = { (GLfloat) 1.0, (GLfloat) 1.0, (GLfloat) 0.5 [[gameView gameController] loadPlayerIfRequired]; + [player set_up:NO]; //reset the player - don't call js reset, avoid duplicate reset calls. + [player setUpShipFromDictionary:[self getDictionaryForShip:[player ship_desc]]]; // ship_desc is the standard Cobra at this point + [self setGalaxy_seed: [player galaxy_seed]]; system_seed = [self findSystemAtCoords:[player galaxy_coordinates] withGalaxySeed:galaxy_seed]; @@ -2580,11 +2583,8 @@ GLfloat docked_light_specular[4] = { (GLfloat) 1.0, (GLfloat) 1.0, (GLfloat) 0.5 [self setUpSpace]; if (![[self station] localMarket]) - [[self station] initialiseLocalMarketWithSeed:system_seed andRandomFactor:[player random_factor]]; - - [player set_up]; //reset the player - [player setUpShipFromDictionary:[self getDictionaryForShip:[player ship_desc]]]; // ship_desc is the standard Cobra at this point - + [[self station] initialiseLocalMarketWithSeed:system_seed andRandomFactor:[player random_factor]]; + //[self doScriptEvent:@"reset"] [player setStatus:STATUS_DOCKED]; [player setGuiToStatusScreen]; displayGUI = YES;