mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-18 18:11:22 +00:00
Fixing stuff and use cmd's
This commit is contained in:
parent
d5975a6efd
commit
0ac2e68c6a
2 changed files with 66 additions and 53 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/05/09 02:43:12 jbravo
|
||||
// Fixing stuff and use cmd's
|
||||
//
|
||||
// Revision 1.33 2002/05/07 15:04:56 slicer
|
||||
// Removed a debug message left behind..
|
||||
//
|
||||
|
@ -1375,14 +1378,14 @@ static void CG_ServerCommand( void ) {
|
|||
return;
|
||||
}*/
|
||||
|
||||
if ( !strcmp( cmd, "delCheatVar" ) )
|
||||
{//remove a cvar from the list of cheat variables
|
||||
if (!strcmp( cmd, "delCheatVar")) {
|
||||
//remove a cvar from the list of cheat variables
|
||||
//not needed now, mabey later?
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !strcmp( cmd, "addCheatVar" ) )
|
||||
{//add a cvar from the list of cheat variables
|
||||
if (!strcmp(cmd, "addCheatVar")) {
|
||||
//add a cvar from the list of cheat variables
|
||||
char param[128];
|
||||
int i;
|
||||
float lowend, highend;
|
||||
|
@ -1405,12 +1408,10 @@ static void CG_ServerCommand( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !strcmp( cmd, "breakable" ) )
|
||||
{
|
||||
if (!strcmp(cmd, "breakable")) {
|
||||
int id;
|
||||
id = atoi(CG_Argv(1));
|
||||
if (id >= 0 && id < RQ3_MAX_BREAKABLES)
|
||||
{
|
||||
if (id >= 0 && id < RQ3_MAX_BREAKABLES) {
|
||||
//Com_Printf("Registering breakable %s ID=%d\n",CG_Argv(2), id);
|
||||
//Blaze: Breakable stuff - register the models, sounds, and explosion shader
|
||||
cgs.media.breakables[id].model[0] = trap_R_RegisterModel( va("breakables/%s/models/break1.md3",CG_Argv(2)));
|
||||
|
@ -1422,19 +1423,25 @@ static void CG_ServerCommand( void ) {
|
|||
cgs.media.breakables[id].sound[2] = trap_S_RegisterSound( va("breakables/%s/sounds/break3.wav", CG_Argv(2)), qfalse);
|
||||
cgs.media.breakables[id].exp_sound = trap_S_RegisterSound( va("breakables/%s/sounds/explosion.wav", CG_Argv(2)), qfalse);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
CG_Printf("ID was %d\n",id);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (!strcmp(cmd, "rq3_cmd")) {
|
||||
CG_RQ3_Cmd();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strcmp(cmd, "stuff")) {
|
||||
char *cmd;
|
||||
|
||||
cmd = CG_ConcatArgs (1);
|
||||
trap_SendConsoleCommand (cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
CG_Printf( "Unknown client game command: %s\n", cmd );
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.84 2002/05/09 02:43:12 jbravo
|
||||
// Fixing stuff and use cmd's
|
||||
//
|
||||
// Revision 1.83 2002/05/07 13:35:45 jbravo
|
||||
// Fixed the double lights for spectators and made the use cmd use rq3_cmd
|
||||
// and made scoreboard not revieal whos alive or dead to live players.
|
||||
|
@ -1582,7 +1585,7 @@ void RQ3_SpectatorMode(gentity_t *ent)
|
|||
|
||||
void RQ3_Cmd_Use_f(gentity_t *ent)
|
||||
{
|
||||
char *cmd;
|
||||
char *cmd, buf[128];
|
||||
int weapon, i;
|
||||
|
||||
if (!ent->client) {
|
||||
|
@ -1684,7 +1687,9 @@ void RQ3_Cmd_Use_f(gentity_t *ent)
|
|||
}
|
||||
if (weapon == ent->client->ps.weapon)
|
||||
return;
|
||||
trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i weapon %i\n", STUFF, weapon));
|
||||
Com_sprintf (buf, sizeof(buf), "stuff weapon %d\n", weapon);
|
||||
trap_SendServerCommand(ent-g_entities, buf);
|
||||
// trap_SendServerCommand(ent-g_entities, va("rq3_cmd %i weapon %i", STUFF, weapon));
|
||||
}
|
||||
|
||||
void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod)
|
||||
|
@ -1810,5 +1815,6 @@ void RQ3_Cmd_Stuff (void)
|
|||
client = atoi (user);
|
||||
cmd = ConcatArgs(2);
|
||||
|
||||
trap_SendServerCommand(client, va("rq3_cmd %i %s\n", STUFF, cmd));
|
||||
trap_SendServerCommand(client, va("stuff %s\n", cmd));
|
||||
// trap_SendServerCommand(client, va("rq3_cmd %i %s\n", STUFF, cmd));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue