tweaked the updating behavior in the probe manager so calling updateProbes just flags a ProbesDirty bool, which is used to kick the update of the static parameters when the bin's render() is called

that way if multiple probes get updated at once, we don't hit the update loop for each one, which is obviously silly
also fixed the 'probes' cubemaps aren't ready until you nudge them'
turns out when we were setting out global var which we used for the irradiance and prefilter cubemap paths, it was being set AFTER the probes got loaded
so it was using an invalid path to look up the cubemaps
-@areloch
This commit is contained in:
AzaezelX 2019-04-22 15:39:55 -05:00
parent bf10d48287
commit e6a14514e0
3 changed files with 12 additions and 29 deletions

View file

@ -40,6 +40,10 @@ function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack)
// These need to come after the cls.
echo ("*** New Mission: " @ %missionName);
echo ("*** Phase 1: Download Datablocks & Targets");
$Client::MissionFile = %missionName;
$pref::ReflectionProbes::CurrentLevelPath = filePath($Client::MissionFile) @ "/" @ fileBase($Client::MissionFile) @ "/probes/";
onMissionDownloadPhase1(%missionName, %musicTrack);
commandToServer('MissionStartPhase1Ack', %seq);
}
@ -89,7 +93,6 @@ function clientCmdMissionStartPhase3(%seq,%missionName)
echo ("*** Phase 3: Mission Lighting");
$MSeq = %seq;
$Client::MissionFile = %missionName;
$pref::ReflectionProbes::CurrentLevelPath = filePath($Client::MissionFile) @ "/" @ fileBase($Client::MissionFile) @ "/probes/";
// Need to light the mission before we are ready.
// The sceneLightingComplete function will complete the handshake