Accessing/Location of the relighting function
by Charles Williams · in Technical Issues · 10/23/2002 (11:53 pm) · 4 replies
Our project requires that at times we relight the scene, we found a funciton that looks like it relights the scene, but it is never called, ever! If someone could post some information on where the real scene lighting function is, and how to make a call to it through either the code or scripts, I would really appreciate it.
About the author
#2
Did you make sure that the lighting data wasn't cached when you looked at the function? It's possible the function isn't called when there is already lighting info...
10/24/2002 (7:21 am)
Search the .cs files for "relight". That ought to get you a result (find in file would be good).Did you make sure that the lighting data wasn't cached when you looked at the function? It's possible the function isn't called when there is already lighting info...
#3
10/24/2002 (8:17 am)
The relight function is *never* called. I did a walkthough... where is the code for the shortcut alt-L in the scripts?
#4
Now, that wasn't so hard, was it?
10/24/2002 (12:05 pm)
From common\client\missionDownload.cs://----------------------------------------------------------------------------
// Phase 3
//----------------------------------------------------------------------------
function clientCmdMissionStartPhase3(%seq,%missionName)
{
onPhase2Complete();
StartClientReplication();
echo ("*** Turning on Foliage Replication");
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;
}
}
function updateLightingProgress()
{
onPhase3Progress($SceneLighting::lightingProgress);
if ($lightingMission)
$lightingProgressThread = schedule(1, 0, "updateLightingProgress");
}
function sceneLightingComplete()
{
echo("Mission lighting done");
onPhase3Complete();
// The is also the end of the mission load cycle.
onMissionDownloadComplete();
commandToServer('MissionStartPhase3Ack', $MSeq);
}Now, that wasn't so hard, was it?
Torque 3D Owner Eric Forhan
Eric