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

Method SetPreferredViewDistance

engine/Poseidon/World/Scene/Scene.cpp:533–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531 GWorld->AdjustSubdivision(GWorld->GetMode());
532 }
533}
534void Scene::SetPreferredViewDistance(float x)
535{
536 float cliVD = AppConfig::Instance().GetViewDistanceOverride();
537 if (cliVD > 0)
538 x = cliVD;
539 else
540 saturate(x, GameSettingsConfig::kMinViewDistance, GameSettingsConfig::kMaxViewDistance);
541 _preferredViewDistance = x;
542
543 if (GWorld && GWorld->GetMode() != GModeNetware)
544 {
545 GWorld->AdjustSubdivision(GWorld->GetMode());
546 }
547}
548
549void Scene::SetObjectShadows(bool set)

Callers 5

OnSliderPosChangedMethod · 0.80
OnButtonClickedMethod · 0.80
ApplyToRuntimeFunction · 0.80

Calls 4

saturateFunction · 0.85
AdjustSubdivisionMethod · 0.80
GetModeMethod · 0.45

Tested by

no test coverage detected