-#ifndef COMMAND_COMMON_H
-#define COMMAND_COMMON_H
+#pragma once
-#include "../../common/command/command.qh"
+#include <common/command/_mod.qh>
REGISTRY(COMMON_COMMANDS, BITS(7))
#define COMMON_COMMANDS_from(i) _COMMON_COMMANDS_from(i, NULL)
REGISTER_REGISTRY(COMMON_COMMANDS)
ATTRIB(commoncommand_##id, m_description, string, description); \
ENDCLASS(commoncommand_##id) \
REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); \
- METHOD(commoncommand_##id, m_invokecmd, void(int request, entity caller, int arguments, string command))
+ METHOD(commoncommand_##id, m_invokecmd, void(commoncommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(COMMON_COMMANDS_aliases) {
FOREACH(COMMON_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svcmd"))));
}
#include "vote.qh"
-#include "../../common/monsters/spawn.qh"
+#include <common/monsters/spawn.qh>
-#include "../../common/command/generic.qh"
-#include "../../common/command/command.qh"
+#include <common/command/_mod.qh>
// ============================================================
// Shared declarations for server commands, written by Samual
.vector lastV_angle; // used when pausing the game in order to force the player to keep his old view angle fixed
// allow functions to be used in other code like g_world.qc and teamplay.qc
-void timeout_handler_think();
+void timeout_handler_think(entity this);
// used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
void CommonCommand_macro_write_aliases(float fh);
// ==========================================
// used by CommonCommand_timeout() and CommonCommand_timein() to handle game pausing and messaging and such.
-void timeout_handler_reset();
+void timeout_handler_reset(entity this);
-void timeout_handler_think();
+void timeout_handler_think(entity this);
// ===================================================
// Common commands used in both sv_cmd.qc and cmd.qc
{
string c = strtolower(argv(0));
FOREACH(COMMON_COMMANDS, it.m_name == c, LAMBDA(
- it.m_invokecmd(CMD_REQUEST_COMMAND, caller, argc, command);
+ it.m_invokecmd(it, CMD_REQUEST_COMMAND, caller, argc, command);
return true;
));
return false;
{
string c = strtolower(argv(1));
FOREACH(COMMON_COMMANDS, it.m_name == c, LAMBDA(
- it.m_invokecmd(CMD_REQUEST_USAGE, caller, argc, "");
+ it.m_invokecmd(it, CMD_REQUEST_USAGE, caller, argc, "");
return true;
));
return false;
{
FOREACH(COMMON_COMMANDS, true, LAMBDA(CMD_Write_Alias("qc_cmd_svcmd", it.m_name, it.m_description)));
}
-
-
-#endif