start of ranked component
This commit is contained in:
parent
f9d405ee7c
commit
0418527137
@ -112,8 +112,6 @@ namespace dedicated
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
command::execute("onlinegame 1", true);
|
|
||||||
command::execute("xblive_privatematch 1", true);
|
|
||||||
initialize_gamemode();
|
initialize_gamemode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
34
src/client/component/ranked.cpp
Normal file
34
src/client/component/ranked.cpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#include <std_include.hpp>
|
||||||
|
#include "loader/component_loader.hpp"
|
||||||
|
|
||||||
|
#include "component/dvars.hpp"
|
||||||
|
|
||||||
|
#include "game/game.hpp"
|
||||||
|
|
||||||
|
#include <utils/hook.hpp>
|
||||||
|
#include <utils/flags.hpp>
|
||||||
|
|
||||||
|
namespace ranked
|
||||||
|
{
|
||||||
|
class component final : public component_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void post_unpack() override
|
||||||
|
{
|
||||||
|
dvars::override::register_bool("xblive_privatematch", false, game::DVAR_FLAG_REPLICATED);
|
||||||
|
|
||||||
|
if (game::environment::is_dedi())
|
||||||
|
{
|
||||||
|
dvars::override::register_bool("xblive_privatematch", false, game::DVAR_FLAG_REPLICATED | game::DVAR_FLAG_WRITE);
|
||||||
|
game::Dvar_RegisterBool("onlinegame", true, game::DVAR_FLAG_READ, "Current game is an online game with stats, custom classes, unlocks");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
component_priority priority() override
|
||||||
|
{
|
||||||
|
return component_priority::ranked;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
REGISTER_COMPONENT(ranked::component)
|
@ -4,6 +4,7 @@ enum class component_priority
|
|||||||
{
|
{
|
||||||
min = 0,
|
min = 0,
|
||||||
dvars,
|
dvars,
|
||||||
|
ranked,
|
||||||
steam_proxy,
|
steam_proxy,
|
||||||
arxan,
|
arxan,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user