[General] Disable certain components when running as dedi

- Changelog
- D3D9Ex
- Renderer
- UIScript
- UIFeeder
This commit is contained in:
momo5502 2017-02-25 12:54:26 +01:00
parent 3d2e8446f2
commit 46c054e7a8
6 changed files with 11 additions and 0 deletions

View File

@ -51,6 +51,8 @@ namespace Components
Changelog::Changelog()
{
if (Dedicated::IsEnabled()) return;
// Changelog
UIFeeder::Add(62.0f, Changelog::GetChangelogCount, Changelog::GetChangelogText, Changelog::SelectChangelog);
}

View File

@ -745,6 +745,8 @@ namespace Components
D3D9Ex::D3D9Ex()
{
if (Dedicated::IsEnabled()) return;
Dvar::Register<bool>("r_useD3D9Ex", true, Game::dvar_flag::DVAR_FLAG_SAVED, "Use extended d3d9 interface!");
// Hook Interface creation

View File

@ -535,6 +535,7 @@ namespace Components
Friends::LoggedOn = false;
if (Dedicated::IsEnabled() ||ZoneBuilder::IsEnabled()) return;
Dvar::Register<bool>("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "");
Dvar::Register<int>("cl_notifyFriendState", 1, -1, 1, Game::DVAR_FLAG_SAVED, "");

View File

@ -94,6 +94,8 @@ namespace Components
Renderer::Renderer()
{
if (Dedicated::IsEnabled()) return;
// Renderer::OnBackendFrame([] (IDirect3DDevice9* device)
// {
// if (Game::Sys_Milliseconds() % 2)

View File

@ -379,6 +379,8 @@ namespace Components
UIFeeder::UIFeeder()
{
if (Dedicated::IsEnabled()) return;
Dvar::OnInit([]()
{
Dvar::Register<const char*>("ui_map_long", "Afghan", Game::dvar_flag::DVAR_FLAG_NONE, "");

View File

@ -116,6 +116,8 @@ namespace Components
UIScript::UIScript()
{
if (Dedicated::IsEnabled()) return;
// Install handler
Utils::Hook::RedirectJump(0x45EC59, UIScript::RunMenuScriptStub);