Game Development Community

Not saving .ml

by Archnemesis · in Torque Game Engine · 11/14/2005 (4:43 pm) · 0 replies

Hi, been awhile since I posted. Most everything seems to have been covered here already, but I am having problems finding this.

I need to relight every mission everytime it is loaded, as I am adding interiors randomly. Therefore I would need to bypass the saving and loading of .ml files.

Is there a quick hack in the Torquescripts that would let me do this?

I am not sure exactly what is being done in this function from Missiondownload.cs
function clientCmdMissionStartPhase3(%seq,%missionName)
{
   onPhase2Complete();
   StartClientReplication();
   StartFoliageReplication();
   echo ("*** Phase 3: Mission Lighting");
   $MSeq = %seq;
   $Client::MissionFile = %missionName;

   

    //Need to light the mission before we are ready.
   // The sceneLightingComplete function will complete the handshake 
   // once the scene lighting is done.
   if (lightScene("sceneLightingComplete", ""))
   {
      error("Lighting mission....");
      schedule(1, 0, "updateLightingProgress");
      onMissionDownloadPhase3(%missionName);
      $lightingMission = true;
   }

}

I have commented out the last part and added a few lines (as seen below). This seems to work, but it skips the LIGHTING MISSION progress bar and still adds the .ml file. Any suggestions

function clientCmdMissionStartPhase3(%seq,%missionName)
{
   onPhase2Complete();
   StartClientReplication();
   StartFoliageReplication();
   echo ("*** Phase 3: Mission Lighting");
   $MSeq = %seq;
   $Client::MissionFile = %missionName;

   

   // Need to light the mission before we are ready.
   // The sceneLightingComplete function will complete the handshake 
   // once the scene lighting is done.
//   if (lightScene("sceneLightingComplete", ""))
//   {
//      error("Lighting mission....");
//      schedule(1, 0, "updateLightingProgress");
//      onMissionDownloadPhase3(%missionName);
//      $lightingMission = true;
//   }

//added this to force lighting
lightScene("",forceAlways);
sceneLightingComplete();
}