MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / InitFinish

Method InitFinish

engine/Poseidon/World/WorldInit.cpp:914–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914void World::InitFinish()
915{
916 InitCameraPars();
917
918 _scene.GetLandscape()->MakeShadows(_scene);
919
920 const ParamEntry& entry = Pars >> "CfgEnvSounds" >> "Sea" >> "sound";
921 RString waveName = GetSoundName(entry[0]);
922 if (GSoundsys)
923 {
924 float duration = GSoundsys->GetWaveDuration(waveName);
925 if (duration > 0.1)
926 {
927 _scene.GetLandscape()->SetSeaWaveSpeed(1 / duration);
928 }
929 else
930 {
931 _scene.GetLandscape()->SetSeaWaveSpeed(1 / 2.0);
932 }
933 }
934 else
935 {
936 _scene.GetLandscape()->SetSeaWaveSpeed(1 / 2.0);
937 }
938}
939
940const GridInfo* World::GetGridInfo(float zoom) const
941{

Callers

nothing calls this directly

Calls 5

GetSoundNameFunction · 0.85
MakeShadowsMethod · 0.80
GetLandscapeMethod · 0.80
SetSeaWaveSpeedMethod · 0.80
GetWaveDurationMethod · 0.45

Tested by

no test coverage detected