Some changes to autoaction, still need to fix up a little bit more stuff relating to getting sent 2 screenshot requests

This commit is contained in:
Scott Brooks 2002-05-23 03:07:10 +00:00
parent 5798ec8f40
commit 883b49dff6
4 changed files with 58 additions and 23 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.42 2002/05/23 03:06:56 blaze
// Some changes to autoaction, still need to fix up a little bit more stuff relating to getting sent 2 screenshot requests
//
// Revision 1.41 2002/05/20 16:23:44 jbravo // Revision 1.41 2002/05/20 16:23:44 jbravo
// Fixed spec problem when noone is alive. Fixed kicking teammates bug // Fixed spec problem when noone is alive. Fixed kicking teammates bug
// //
@ -1282,7 +1285,9 @@ void CG_RQ3_Cmd () {
case ROUND: case ROUND:
trap_Cvar_Set("cg_RQ3_team_round_going", CG_Argv(1)); trap_Cvar_Set("cg_RQ3_team_round_going", CG_Argv(1));
break; break;
case MAPSTART: case MAPSTART:
break;
case STARTDEMO:
switch (cg_RQ3_autoAction.integer) { switch (cg_RQ3_autoAction.integer) {
case 1: case 1:
case 3: case 3:
@ -1291,33 +1296,43 @@ void CG_RQ3_Cmd () {
RemoveColorEscapeSequences (playerName); RemoveColorEscapeSequences (playerName);
Com_sprintf (scrnshotName, sizeof(scrnshotName), "record %d-%d-%d_%d-%d-%d_%s_%s\n", qtime.tm_year + 1900, Com_sprintf (scrnshotName, sizeof(scrnshotName), "record %d-%d-%d_%d-%d-%d_%s_%s\n", qtime.tm_year + 1900,
qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec, cgs.mapname, playerName); qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec, cgs.mapname, playerName);
for (i=0; i<MAX_QPATH; i++) { for (i=0; i<MAX_QPATH; i++) {
switch (scrnshotName[i]) { switch (scrnshotName[i]) {
case '>': case '>':
case '<': case '<':
case '"': case '"':
case '?': case '?':
case '*': case '*':
case ':': case ':':
case '\\': case '\\':
case '/': case '/':
case '|': case '|':
scrnshotName[i] = '_'; scrnshotName[i] = '_';
break; break;
} }
} }
trap_SendConsoleCommand ("g_synchronousClients 1\n"); trap_SendConsoleCommand ("g_synchronousClients 1\n");
trap_SendConsoleCommand (scrnshotName); trap_SendConsoleCommand (scrnshotName);
trap_SendConsoleCommand ("g_synchronousClients 0\n"); trap_SendConsoleCommand ("g_synchronousClients 0\n");
break; break;
} }
break; break;
case MAPEND: case MAPEND:
cg.showScores = qtrue; cg.showScores = qtrue;
cg.scoreTPMode = 0; cg.scoreTPMode = 0;
switch (cg_RQ3_autoAction.integer) { break;
case STOPDEMO:
switch (cg_RQ3_autoAction.integer)
{
case 1:
case 3: case 3:
trap_SendConsoleCommand ("stoprecord\n"); trap_SendConsoleCommand ("stoprecord\n");
break;
}
case SCREENSHOT:
switch (cg_RQ3_autoAction.integer)
{
case 3:
case 2: case 2:
trap_RealTime(&qtime); trap_RealTime(&qtime);
Com_sprintf(playerName, sizeof(playerName), "%s", cgs.clientinfo->name); Com_sprintf(playerName, sizeof(playerName), "%s", cgs.clientinfo->name);

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.69 2002/05/23 03:07:10 blaze
// Some changes to autoaction, still need to fix up a little bit more stuff relating to getting sent 2 screenshot requests
//
// Revision 1.68 2002/05/21 04:58:27 blaze // Revision 1.68 2002/05/21 04:58:27 blaze
// kicked the reload bugs ass! // kicked the reload bugs ass!
// //
@ -281,7 +284,10 @@ enum {
SETWEAPON, SETWEAPON,
STUFF, STUFF,
TKOK, TKOK,
RADIO RADIO,
STARTDEMO,
STOPDEMO,
SCREENSHOT
}; };
//Elder: sound events for EV_RQ3_SOUND //Elder: sound events for EV_RQ3_SOUND
typedef enum { typedef enum {

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.59 2002/05/23 03:07:10 blaze
// Some changes to autoaction, still need to fix up a little bit more stuff relating to getting sent 2 screenshot requests
//
// Revision 1.58 2002/05/12 12:15:05 slicer // Revision 1.58 2002/05/12 12:15:05 slicer
// Added Referee command for captains // Added Referee command for captains
// //
@ -1414,6 +1417,11 @@ void BeginIntermission( void ) {
if (g_gametype.integer != GT_TEAMPLAY) if (g_gametype.integer != GT_TEAMPLAY)
SendScoreboardMessageToAllClients(); SendScoreboardMessageToAllClients();
//Stop the demos
trap_SendServerCommand (-1, va("rq3_cmd %i",STOPDEMO));
//Take the screen shot
trap_SendServerCommand (-1, va("rq3_cmd %i",SCREENSHOT));
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.96 2002/05/23 03:07:10 blaze
// Some changes to autoaction, still need to fix up a little bit more stuff relating to getting sent 2 screenshot requests
//
// Revision 1.95 2002/05/20 16:23:44 jbravo // Revision 1.95 2002/05/20 16:23:44 jbravo
// Fixed spec problem when noone is alive. Fixed kicking teammates bug // Fixed spec problem when noone is alive. Fixed kicking teammates bug
// //
@ -406,9 +409,12 @@ void CheckTeamRules()
if (!player->inuse) if (!player->inuse)
continue; continue;
G_AddEvent (player, EV_RQ3_SOUND, RQ3_SOUND_COUNTDOWN); G_AddEvent (player, EV_RQ3_SOUND, RQ3_SOUND_COUNTDOWN);
trap_SendServerCommand( -1, va("rq3_cmd %i 0", MAPSTART)); trap_SendServerCommand( i, va("rq3_cmd %i 0", STARTDEMO));
} }
//Blaze: moved from below the G_AddEvent
trap_SendServerCommand( -1, va("rq3_cmd %i 0", MAPSTART));
} }
} }
level.rulecheckfrequency++; level.rulecheckfrequency++;