[General] Disable certain components when running as dedi
- Changelog - D3D9Ex - Renderer - UIScript - UIFeeder
This commit is contained in:
parent
3d2e8446f2
commit
46c054e7a8
@ -51,6 +51,8 @@ namespace Components
|
|||||||
|
|
||||||
Changelog::Changelog()
|
Changelog::Changelog()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled()) return;
|
||||||
|
|
||||||
// Changelog
|
// Changelog
|
||||||
UIFeeder::Add(62.0f, Changelog::GetChangelogCount, Changelog::GetChangelogText, Changelog::SelectChangelog);
|
UIFeeder::Add(62.0f, Changelog::GetChangelogCount, Changelog::GetChangelogText, Changelog::SelectChangelog);
|
||||||
}
|
}
|
||||||
|
@ -745,6 +745,8 @@ namespace Components
|
|||||||
|
|
||||||
D3D9Ex::D3D9Ex()
|
D3D9Ex::D3D9Ex()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled()) return;
|
||||||
|
|
||||||
Dvar::Register<bool>("r_useD3D9Ex", true, Game::dvar_flag::DVAR_FLAG_SAVED, "Use extended d3d9 interface!");
|
Dvar::Register<bool>("r_useD3D9Ex", true, Game::dvar_flag::DVAR_FLAG_SAVED, "Use extended d3d9 interface!");
|
||||||
|
|
||||||
// Hook Interface creation
|
// Hook Interface creation
|
||||||
|
@ -535,6 +535,7 @@ namespace Components
|
|||||||
Friends::LoggedOn = false;
|
Friends::LoggedOn = false;
|
||||||
|
|
||||||
if (Dedicated::IsEnabled() ||ZoneBuilder::IsEnabled()) return;
|
if (Dedicated::IsEnabled() ||ZoneBuilder::IsEnabled()) return;
|
||||||
|
|
||||||
Dvar::Register<bool>("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "");
|
Dvar::Register<bool>("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "");
|
||||||
Dvar::Register<int>("cl_notifyFriendState", 1, -1, 1, Game::DVAR_FLAG_SAVED, "");
|
Dvar::Register<int>("cl_notifyFriendState", 1, -1, 1, Game::DVAR_FLAG_SAVED, "");
|
||||||
|
|
||||||
|
@ -94,6 +94,8 @@ namespace Components
|
|||||||
|
|
||||||
Renderer::Renderer()
|
Renderer::Renderer()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled()) return;
|
||||||
|
|
||||||
// Renderer::OnBackendFrame([] (IDirect3DDevice9* device)
|
// Renderer::OnBackendFrame([] (IDirect3DDevice9* device)
|
||||||
// {
|
// {
|
||||||
// if (Game::Sys_Milliseconds() % 2)
|
// if (Game::Sys_Milliseconds() % 2)
|
||||||
|
@ -379,6 +379,8 @@ namespace Components
|
|||||||
|
|
||||||
UIFeeder::UIFeeder()
|
UIFeeder::UIFeeder()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled()) return;
|
||||||
|
|
||||||
Dvar::OnInit([]()
|
Dvar::OnInit([]()
|
||||||
{
|
{
|
||||||
Dvar::Register<const char*>("ui_map_long", "Afghan", Game::dvar_flag::DVAR_FLAG_NONE, "");
|
Dvar::Register<const char*>("ui_map_long", "Afghan", Game::dvar_flag::DVAR_FLAG_NONE, "");
|
||||||
|
@ -116,6 +116,8 @@ namespace Components
|
|||||||
|
|
||||||
UIScript::UIScript()
|
UIScript::UIScript()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled()) return;
|
||||||
|
|
||||||
// Install handler
|
// Install handler
|
||||||
Utils::Hook::RedirectJump(0x45EC59, UIScript::RunMenuScriptStub);
|
Utils::Hook::RedirectJump(0x45EC59, UIScript::RunMenuScriptStub);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user