2021-12-09 07:01:37 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class ClientCommand : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ClientCommand();
|
2022-03-15 20:44:59 -04:00
|
|
|
|
2022-08-21 12:52:54 -04:00
|
|
|
static void Add(const char* name, const std::function<void(Game::gentity_s*, const Command::ServerParams*)>& callback);
|
2021-12-09 07:01:37 -05:00
|
|
|
static bool CheatsOk(const Game::gentity_s* ent);
|
|
|
|
|
|
|
|
private:
|
2022-08-21 12:52:54 -04:00
|
|
|
static std::unordered_map<std::string, std::function<void(Game::gentity_s*, const Command::ServerParams*)>> HandlersSV;
|
2021-12-09 07:01:37 -05:00
|
|
|
|
2022-07-23 19:08:01 -04:00
|
|
|
static void ClientCommandStub(int clientNum);
|
2021-12-09 07:01:37 -05:00
|
|
|
static void AddCheatCommands();
|
2022-04-12 08:34:51 -04:00
|
|
|
static void AddDevelopmentCommands();
|
2021-12-09 07:01:37 -05:00
|
|
|
static void AddScriptFunctions();
|
|
|
|
};
|
|
|
|
}
|