Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
reg.qh File Reference
#include "command.qh"
Include dependency graph for reg.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GENERIC_COMMAND(id, description, menubased)

Functions

 STATIC_INIT (GENERIC_COMMANDS_aliases)

Variables

bool m_menubased

Macro Definition Documentation

◆ GENERIC_COMMAND

#define GENERIC_COMMAND ( id,
description,
menubased )
Value:
CLASS(genericcommand_##id, Command) \
ATTRIB(genericcommand_##id, m_name, string, #id); \
ATTRIB(genericcommand_##id, m_description, string, description); \
ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
ENDCLASS(genericcommand_##id) \
REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool m_menubased
Definition reg.qh:10
string m_name
Definition scores.qh:142
int m_id
Definition effect.qh:19
#define NEW(cname,...)
Definition oo.qh:117
#define CLASS(...)
Definition oo.qh:145
this m_description
Definition pages.qc:28

Definition at line 12 of file reg.qh.

12#define GENERIC_COMMAND(id, description, menubased) \
13 CLASS(genericcommand_##id, Command) \
14 ATTRIB(genericcommand_##id, m_name, string, #id); \
15 ATTRIB(genericcommand_##id, m_description, string, description); \
16 ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
17 ENDCLASS(genericcommand_##id) \
18 REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
19 METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))

Function Documentation

◆ STATIC_INIT()

STATIC_INIT ( GENERIC_COMMANDS_aliases )

Definition at line 21 of file reg.qh.

21 {
22 FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, ((it.m_menubased) ? "qc_cmd_svmenu" : "qc_cmd_svcl"))));
23}
#define FOREACH(list, cond, body)
Definition iter.qh:19
void localcmd(string command,...)

References FOREACH, and localcmd().

Variable Documentation

◆ m_menubased

bool m_menubased

Definition at line 10 of file reg.qh.