iw5-mod/src/game/game.cpp

36 lines
535 B
C++
Raw Normal View History

2018-12-24 23:22:56 +01:00
#include <std_include.hpp>
#include "game.hpp"
namespace game
{
namespace native
{
Sys_ShowConsole_t Sys_ShowConsole;
}
launcher::mode mode = launcher::mode::NONE;
bool is_mp()
{
return mode == launcher::mode::MULTIPLAYER;
}
bool is_sp()
{
return mode == launcher::mode::SINGLEPLAYER;
}
bool is_dedi()
{
return mode == launcher::mode::SERVER;
}
void initialize(const launcher::mode _mode)
{
mode = _mode;
native::Sys_ShowConsole = native::Sys_ShowConsole_t(SELECT_VALUE(0x470AF0, 0x5CF590, 0));
}
}