mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-27 14:32:15 +00:00
Fixing the stuff cmd to work on dedicated servers.
This commit is contained in:
parent
d514faeb74
commit
1c6ac9090e
4 changed files with 23 additions and 8 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.102 2002/05/04 16:19:02 jbravo
|
||||
// Fixing the stuff cmd to work on dedicated servers.
|
||||
//
|
||||
// Revision 1.101 2002/05/01 18:44:36 jbravo
|
||||
// Added a stuff command. Needed for misc things. See bottum of cmd_use in
|
||||
// g_teamplay.c
|
||||
|
@ -2907,8 +2910,6 @@ void ClientCommand( int clientNum ) {
|
|||
// JBravo: adding tkok
|
||||
else if (Q_stricmp (cmd, "tkok") == 0)
|
||||
RQ3_Cmd_TKOk (ent);
|
||||
else if (Q_stricmp (cmd, "stuff") == 0)
|
||||
RQ3_Cmd_Stuff (ent);
|
||||
//Elder: stuff for dropping items
|
||||
else if (Q_stricmp (cmd, "dropitem") == 0)
|
||||
Cmd_DropItem_f( ent );
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.8 2002/05/04 16:19:02 jbravo
|
||||
// Fixing the stuff cmd to work on dedicated servers.
|
||||
//
|
||||
// Revision 1.7 2002/04/03 15:51:01 jbravo
|
||||
// Small warning fixes
|
||||
//
|
||||
|
@ -25,7 +28,7 @@
|
|||
// this file holds commands that can be executed by the server console, but not remote clients
|
||||
|
||||
#include "g_local.h"
|
||||
|
||||
#include "g_teamplay.h"
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
@ -461,6 +464,12 @@ qboolean ConsoleCommand( void ) {
|
|||
return qtrue;
|
||||
}
|
||||
|
||||
// JBravo: adding a stuff cmd.
|
||||
if (Q_stricmp (cmd, "stuff") == 0) {
|
||||
RQ3_Cmd_Stuff();
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if (Q_stricmp (cmd, "listip") == 0) {
|
||||
trap_SendConsoleCommand( EXEC_NOW, "g_banIPs\n" );
|
||||
return qtrue;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.76 2002/05/04 16:19:02 jbravo
|
||||
// Fixing the stuff cmd to work on dedicated servers.
|
||||
//
|
||||
// Revision 1.75 2002/05/04 16:13:05 makro
|
||||
// Bots
|
||||
//
|
||||
|
@ -1755,20 +1758,20 @@ void RQ3_Cmd_TKOk (gentity_t *ent)
|
|||
ent->enemy = NULL;
|
||||
}
|
||||
|
||||
void RQ3_Cmd_Stuff (gentity_t *ent)
|
||||
void RQ3_Cmd_Stuff (void)
|
||||
{
|
||||
char *cmd, user[128];
|
||||
int len, client;
|
||||
|
||||
len = trap_Argc ();
|
||||
if (len < 3) {
|
||||
trap_SendServerCommand(ent-g_entities, va("print \"Usage: stuff <user id> <text>\n\""));
|
||||
G_Printf ("Usage: stuff <user id> <text>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv(1, user, sizeof(user));
|
||||
if (user[0] < '0' || user[0] > '9') {
|
||||
trap_SendServerCommand(ent-g_entities, va("print \"Usage: stuff <user id> <text>\n\""));
|
||||
G_Printf ("Usage: stuff <user id> <text>\n");
|
||||
return;
|
||||
}
|
||||
client = atoi (user);
|
||||
|
@ -1776,4 +1779,3 @@ void RQ3_Cmd_Stuff (gentity_t *ent)
|
|||
|
||||
trap_SendServerCommand(client, va("stuff %s\n", cmd));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.14 2002/05/04 16:19:02 jbravo
|
||||
// Fixing the stuff cmd to work on dedicated servers.
|
||||
//
|
||||
// Revision 1.13 2002/05/01 18:44:36 jbravo
|
||||
// Added a stuff command. Needed for misc things. See bottum of cmd_use in
|
||||
// g_teamplay.c
|
||||
|
@ -84,6 +87,6 @@ void ParseSayText (gentity_t * ent, char *text);
|
|||
void RQ3_SpectatorMode(gentity_t *ent);
|
||||
void Add_TeamKill(gentity_t *attacker);
|
||||
void RQ3_Cmd_TKOk(gentity_t *ent);
|
||||
void RQ3_Cmd_Stuff(gentity_t *ent);
|
||||
void RQ3_Cmd_Stuff(void);
|
||||
void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod);
|
||||
void setFFState(gentity_t *ent);
|
||||
|
|
Loading…
Reference in a new issue