if (Cmd_Argc(cmd) == 1)
{
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
Con_Print("color <0-15> [0-15]\n");
//if (bottom > 13)
// bottom = 13;
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
Cvar_SetValueQuick(&cl_topcolor, top);
Cvar_SetValueQuick(&cl_bottomcolor, bottom);
// start the map up
if (c > 2)
- Cmd_ExecuteString ( cmd, va(vabuf, sizeof(vabuf), "map %s", Cmd_Argv(cmd, 2)), src_command, false);
+ Cmd_ExecuteString ( cmd, va(vabuf, sizeof(vabuf), "map %s", Cmd_Argv(cmd, 2)), src_local, false);
// open the demo file
Con_Printf("recording to %s.\n", name);
break;
case qw_svc_sellscreen:
- Cmd_ExecuteString(&cmd_client, "help", src_command, true);
+ Cmd_ExecuteString(&cmd_client, "help", src_local, true);
break;
case qw_svc_smallkick:
break;
case svc_sellscreen:
- Cmd_ExecuteString(&cmd_client, "help", src_command, true);
+ Cmd_ExecuteString(&cmd_client, "help", src_local, true);
break;
case svc_hidelmp:
if (gamemode == GAME_TENEBRAE)
(strncmp(firstchar, "in_bind", 7) || !ISWHITESPACE(firstchar[7])))
{
if(Cmd_PreprocessString(current->source, current->text, preprocessed, sizeof(preprocessed), NULL ))
- Cmd_ExecuteString(current->source, preprocessed, src_command, false);
+ Cmd_ExecuteString(current->source, preprocessed, src_local, false);
}
else
{
- Cmd_ExecuteString (current->source, current->text, src_command, false);
+ Cmd_ExecuteString (current->source, current->text, src_local, false);
}
// Recycle memory so using WASD doesn't cause a malloc and free
{
switch (src)
{
- case src_command:
+ case src_local:
if (func->function)
func->function(cmd);
else
{
src_client, ///< came in over a net connection as a clc_stringcmd
///< host_client will be valid during this state.
- src_command ///< from the command buffer
+ src_local ///< from the command buffer
} cmd_source_t;
typedef struct cmdalias_s
int crcflags = csqc_progcrc.flags;
csqc_progcrc.flags &= ~CVAR_READONLY;
csqc_progsize.flags &= ~CVAR_READONLY;
- Cmd_ExecuteString(&cmd_client, msg, src_command, true);
+ Cmd_ExecuteString(&cmd_client, msg, src_local, true);
csqc_progcrc.flags = csqc_progsize.flags = crcflags;
return;
}
l = sizeof(buf) - 1;
strlcpy(buf, p, l + 1); // strlcpy needs a + 1 as it includes the newline!
- Cmd_ExecuteString(&cmd_client, buf, src_command, true);
+ Cmd_ExecuteString(&cmd_client, buf, src_local, true);
p += l;
if(*p == '\n')
else
break; // end of string or overflow
}
- Cmd_ExecuteString(&cmd_client, "curl --clear_autodownload", src_command, true); // don't inhibit CSQC loading
+ Cmd_ExecuteString(&cmd_client, "curl --clear_autodownload", src_local, true); // don't inhibit CSQC loading
return;
}
if (key == K_ENTER || key == K_KP_ENTER || ascii == 10 || ascii == 13)
{
if(chat_mode < 0)
- Cmd_ExecuteString(cmd, chat_buffer, src_command, true); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases!
+ Cmd_ExecuteString(cmd, chat_buffer, src_local, true); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases!
else
CL_ForwardToServer(va(vabuf, sizeof(vabuf), "%s %s", chat_mode ? "say_team" : "say ", chat_buffer));
if(l)
{
client_t *host_client_save = host_client;
- Cmd_ExecuteString(&cmd_server, s, src_command, true);
+ Cmd_ExecuteString(&cmd_server, s, src_local, true);
host_client = host_client_save;
// in case it is a command that changes host_client (like restart)
}
static void SV_Pause_f(cmd_state_t *cmd)
{
void (*print) (const char *fmt, ...);
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
print = Con_Printf;
else
print = SV_ClientPrintf;
}
sv.paused ^= 1;
- if (cmd->source != src_command)
+ if (cmd->source != src_local)
SV_BroadcastPrintf("%s %spaused the game\n", host_client->name, sv.paused ? "" : "un");
else if(*(sv_adminnick.string))
SV_BroadcastPrintf("%s %spaused the game\n", sv_adminnick.string, sv.paused ? "" : "un");
char text[1024];
qboolean fromServer = false;
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
fromServer = true;
teamonly = false;
char text[MAX_INPUTLINE]; // LadyHavoc: FIXME: temporary buffer overflow fix (was 64)
qboolean fromServer = false;
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
fromServer = true;
if (Cmd_Argc (cmd) < 2)
client_t *client;
void (*print) (const char *fmt, ...);
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
print = Con_Printf;
else
print = SV_ClientPrintf;
int frags;
char vabuf[1024];
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
print = Con_Printf;
else
print = SV_ClientPrintf;
ping = bound(0, (int)floor(client->ping*1000+0.5), 9999);
}
- if(sv_status_privacy.integer && cmd->source != src_command && LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) != LHNETADDRESSTYPE_LOOP)
+ if(sv_status_privacy.integer && cmd->source != src_local && LHNETADDRESS_GetAddressType(&host_client->netconnection->peeraddress) != LHNETADDRESSTYPE_LOOP)
strlcpy(ip, client->netconnection ? "hidden" : "botclient", 48);
else
strlcpy(ip, (client->netconnection && *client->netconnection->address) ? client->netconnection->address : "botclient", 48);
strlcpy(newName, newNameSource, sizeof(newName));
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
return;
if (host.realtime < host_client->nametime && strcmp(newName, host_client->name))
rate = atoi(Cmd_Argv(cmd, 1));
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
return;
host_client->rate = rate;
if (i < svs.maxclients)
{
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
if (cls.state == ca_dedicated)
who = "Console";