stuff
This commit is contained in:
parent
da92f0a20c
commit
7ac0de9f86
@ -23,7 +23,7 @@ namespace branding
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game::environment::is_mp)
|
if (game::environment::is_mp())
|
||||||
{
|
{
|
||||||
localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "H1-Mod: MULTIPLAYER\n");
|
localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "H1-Mod: MULTIPLAYER\n");
|
||||||
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-Mod: MULTIPLAYER");
|
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-Mod: MULTIPLAYER");
|
||||||
|
@ -76,7 +76,7 @@ namespace command
|
|||||||
const auto reset = game::Dvar_ValueToString(dvar, dvar->reset, 0);
|
const auto reset = game::Dvar_ValueToString(dvar, dvar->reset, 0);
|
||||||
|
|
||||||
game_console::print(game_console::con_type_info, "\"%s\" is: \"%s\" default: \"%s\" hash: %i",
|
game_console::print(game_console::con_type_info, "\"%s\" is: \"%s\" default: \"%s\" hash: %i",
|
||||||
args[0], current, reset, dvar->name);
|
args[0], current, reset, dvar->hash);
|
||||||
|
|
||||||
game_console::print(game_console::con_type_info, " %s\n",
|
game_console::print(game_console::con_type_info, " %s\n",
|
||||||
dvars::dvar_get_domain(dvar->type, dvar->domain).data());
|
dvars::dvar_get_domain(dvar->type, dvar->domain).data());
|
||||||
|
@ -693,8 +693,6 @@ namespace game_console
|
|||||||
//history.clear();
|
//history.clear();
|
||||||
//});
|
//});
|
||||||
|
|
||||||
char a2[1] = {};
|
|
||||||
|
|
||||||
// add our dvars
|
// add our dvars
|
||||||
dvars::con_inputBoxColor = dvars::register_vec4(
|
dvars::con_inputBoxColor = dvars::register_vec4(
|
||||||
"con_inputBoxColor",
|
"con_inputBoxColor",
|
||||||
|
@ -464,12 +464,24 @@ namespace dvars
|
|||||||
"custom_timelimit"
|
"custom_timelimit"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool can_add_dvar_to_list(std::string name)
|
||||||
|
{
|
||||||
|
for (std::uint32_t i = 0; i < dvar_list.size(); i++)
|
||||||
|
{
|
||||||
|
if (dvar_list[i] == name)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
game::dvar_t* register_int(const std::string& name, int value, int min, int max,
|
game::dvar_t* register_int(const std::string& name, int value, int min, int max,
|
||||||
game::DvarFlags flags, bool add_to_list)
|
game::DvarFlags flags, bool add_to_list)
|
||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
@ -482,7 +494,7 @@ namespace dvars
|
|||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
@ -495,7 +507,7 @@ namespace dvars
|
|||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
@ -509,7 +521,7 @@ namespace dvars
|
|||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
@ -522,7 +534,7 @@ namespace dvars
|
|||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
@ -536,7 +548,7 @@ namespace dvars
|
|||||||
{
|
{
|
||||||
const auto hash = game::generateHashValue(name.data());
|
const auto hash = game::generateHashValue(name.data());
|
||||||
|
|
||||||
if (add_to_list)
|
if (add_to_list && can_add_dvar_to_list(name))
|
||||||
{
|
{
|
||||||
dvar_list.push_back(name);
|
dvar_list.push_back(name);
|
||||||
}
|
}
|
||||||
|
@ -932,7 +932,7 @@ namespace game
|
|||||||
|
|
||||||
struct dvar_t
|
struct dvar_t
|
||||||
{
|
{
|
||||||
const char* name;
|
int hash;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
dvar_type type;
|
dvar_type type;
|
||||||
bool modified;
|
bool modified;
|
||||||
|
@ -110,14 +110,15 @@ void remove_crash_file()
|
|||||||
utils::io::remove_file("__h1Exe");
|
utils::io::remove_file("__h1Exe");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void verify_mwr_version()
|
void verify_mwr_version()
|
||||||
{
|
{
|
||||||
const auto value = *reinterpret_cast<DWORD*>(0x140001337);
|
const auto value = *reinterpret_cast<DWORD*>(0x140001337);
|
||||||
if (value != 0x24AFEB05 && value != 0x1D860F04) //S1
|
//sp && mp
|
||||||
|
if (value != 0xFFB8006D && value != 0xFFB80080)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Unsupported Call of Duty: Advanced Warfare version"s);
|
throw std::runtime_error("Unsupported Call of Duty: Modern Warfare Remastered version"s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
void enable_dpi_awareness()
|
void enable_dpi_awareness()
|
||||||
{
|
{
|
||||||
@ -202,7 +203,7 @@ int main()
|
|||||||
|
|
||||||
if (!component_loader::post_load()) return 0;
|
if (!component_loader::post_load()) return 0;
|
||||||
|
|
||||||
//verify_mwr_version();
|
verify_mwr_version();
|
||||||
|
|
||||||
premature_shutdown = false;
|
premature_shutdown = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user