iw4x-client/src/Components/Modules/ClientCommand.hpp

22 lines
568 B
C++
Raw Normal View History

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