Starter::Starter( const Starter& s ) : Service( s ) { if( s.s_claim || s.s_pid || s.s_birthdate || s.s_port1 >= 0 || s.s_port2 >= 0 ) { EXCEPT( "Trying to copy a Starter object that's already running!" ); } if( s.s_ad ) { s_ad = new ClassAd( *(s.s_ad) ); } else { s_ad = NULL; } if( s.s_path ) { s_path = strnewp( s.s_path ); } else { s_path = NULL; } s_is_dc = s.s_is_dc; initRunData(); }
Starter::Starter() { s_ad = NULL; s_path = NULL; s_is_dc = false; initRunData(); }
bool stageThreeShutDown(void) { debug(LOG_WZ, "== stageThreeShutDown =="); removeSpotters(); // There is an assymetry in scripts initialization and destruction, due // the many different ways scripts get loaded. if (!shutdownScripts()) { return false; } challengesUp = false; challengeActive = false; isInGamePopupUp = false; shutdownTemplates(); // make sure any button tips are gone. widgReset(); audio_StopAll(); if(bMultiPlayer) { multiGameShutdown(); } cmdDroidMultiExpBoost(false); eventReset(); // reset the script values system scrvReset(); //call this here before mission data is released if (!missionShutDown()) { return false; } /* When this line wasn't at this point. The PSX version always failed on the next script after the tutorial ... unexplained why? */ // bInTutorial=false; scrExternReset(); //reset the run data so that doesn't need to be initialised in the scripts initRunData(); resetVTOLLandingPos(); setScriptWinLoseVideo(PLAY_NONE); return true; }
bool stageThreeShutDown() { debug(LOG_WZ, "== stageThreeShutDown =="); hostlaunch = 0; removeSpotters(); // There is an asymmetry in scripts initialization and destruction, due // the many different ways scripts get loaded. if (!shutdownScripts()) { return false; } challengesUp = false; challengeActive = false; isInGamePopupUp = false; shutdownTemplates(); // make sure any button tips are gone. widgReset(); audio_StopAll(); if (bMultiPlayer) { multiGameShutdown(); } eventReset(); // reset the script values system scrvReset(); //call this here before mission data is released if (!missionShutDown()) { return false; } scrExternReset(); // reset the run data so that doesn't need to be initialised in the scripts initRunData(); resetVTOLLandingPos(); setScriptWinLoseVideo(PLAY_NONE); return true; }
bool stageOneInitialise(void) { debug(LOG_WZ, "== stageOneInitalise =="); // Initialise all globals and statics everwhere. if(!InitialiseGlobals()) { return false; } iV_Reset(); // Reset the IV library if (!stringsInitialise()) /* Initialise the string system */ { return false; } if (!objInitialise()) /* Initialise the object system */ { return false; } if (!droidInit()) { return false; } if (!initViewData()) { return false; } if (!grpInitialise()) { return false; } if (!aiInitialise()) /* Initialise the AI system */ // pregame { return false; } if (!anim_Init()) { return false; } if ( !animObj_Init( init_ObjectDead ) ) { return false; } if (!allocPlayerPower()) /*set up the PlayerPower for each player - this should only be done ONCE now*/ { return false; } // initialise the visibility stuff if (!visInitialise()) { return false; } /* Initialise the movement system */ if (!moveInitialise()) { return false; } if (!proj_InitSystem()) { return false; } if (!scrTabInitialise()) // Initialise the old wzscript system { return false; } if (!initScripts()) // Initialise the new javascript system { return false; } if (!gridInitialise()) { return false; } initMission(); initTransporters(); scriptInit(); // do this here so that the very first mission has it initialised initRunData(); gameTimeInit(); eventTimeReset(gameTime / SCR_TICKRATE); return true; }
bool stageOneInitialise() { debug(LOG_WZ, "== stageOneInitialise =="); wzSceneEnd("Main menu loop"); wzSceneBegin("Main game loop"); // Initialise all globals and statics everywhere. if (!InitialiseGlobals()) { return false; } if (!stringsInitialise()) /* Initialise the string system */ { return false; } if (!objInitialise()) /* Initialise the object system */ { return false; } if (!droidInit()) { return false; } if (!initViewData()) { return false; } if (!grpInitialise()) { return false; } if (!aiInitialise()) /* Initialise the AI system */ // pregame { return false; } if (!allocPlayerPower()) /*set up the PlayerPower for each player - this should only be done ONCE now*/ { return false; } // initialise the visibility stuff if (!visInitialise()) { return false; } if (!proj_InitSystem()) { return false; } if (!scrTabInitialise()) // Initialise the old wzscript system { return false; } if (!gridInitialise()) { return false; } initMission(); initTransporters(); scriptInit(); // do this here so that the very first mission has it initialised initRunData(); gameTimeInit(); eventTimeReset(gameTime / SCR_TICKRATE); return true; }