diff --git a/reaction/game/g_cmds.c b/reaction/game/g_cmds.c index 97da7521..50670c9e 100644 --- a/reaction/game/g_cmds.c +++ b/reaction/game/g_cmds.c @@ -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 ); diff --git a/reaction/game/g_svcmds.c b/reaction/game/g_svcmds.c index 8dc4ac55..347b0d4f 100644 --- a/reaction/game/g_svcmds.c +++ b/reaction/game/g_svcmds.c @@ -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; diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index 8b200096..cdd80558 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -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 \n\"")); + G_Printf ("Usage: stuff \n"); return; } trap_Argv(1, user, sizeof(user)); if (user[0] < '0' || user[0] > '9') { - trap_SendServerCommand(ent-g_entities, va("print \"Usage: stuff \n\"")); + G_Printf ("Usage: stuff \n"); return; } client = atoi (user); @@ -1776,4 +1779,3 @@ void RQ3_Cmd_Stuff (gentity_t *ent) trap_SendServerCommand(client, va("stuff %s\n", cmd)); } - diff --git a/reaction/game/g_teamplay.h b/reaction/game/g_teamplay.h index 11d25fdb..c9c78e57 100644 --- a/reaction/game/g_teamplay.h +++ b/reaction/game/g_teamplay.h @@ -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);