From 96aae565da71018d0273a2ba5ade60c95d30141b Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Thu, 13 Apr 2017 11:30:00 +0000 Subject: remove the abusable levelshot command and related hacks --- src/cgame/cg_consolecmds.c | 1 - src/cgame/cg_draw.c | 4 ---- src/cgame/cg_local.h | 1 - src/cgame/cg_servercmds.c | 8 -------- src/game/g_cmds.c | 17 ----------------- 5 files changed, 31 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index 68aab6c..30edd43 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -296,7 +296,6 @@ void CG_InitConsoleCommands( void ) trap_AddCommand( "noclip" ); trap_AddCommand( "team" ); trap_AddCommand( "follow" ); - trap_AddCommand( "levelshot" ); trap_AddCommand( "addbot" ); trap_AddCommand( "setviewpos" ); trap_AddCommand( "callvote" ); diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index c5c9bf1..9efed5e 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -3254,10 +3254,6 @@ static void CG_Draw2D( void ) color[ 0 ] = color[ 1 ] = color[ 2 ] = color[ 3 ] = 1.0f; - // if we are taking a levelshot for the menu, don't draw anything - if( cg.levelShot ) - return; - if( cg_draw2D.integer == 0 ) return; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index ea1694b..ed7d7cc 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -913,7 +913,6 @@ typedef struct int clientNum; qboolean demoPlayback; - qboolean levelShot; // taking a level menu screenshot int deferredPlayerLoading; qboolean loading; // don't defer players at initial startup qboolean intermissionStarted; // don't play voice rewards, because game will end shortly diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 7fb3e06..dd57574 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -913,14 +913,6 @@ static void CG_ServerCommand( void ) trap_R_RemapShader( CG_Argv( 1 ), CG_Argv( 2 ), CG_Argv( 3 ) ); } - // clientLevelShot is sent before taking a special screenshot for - // the menu system during development - if( !strcmp( cmd, "clientLevelShot" ) ) - { - cg.levelShot = qtrue; - return; - } - //the server has triggered a menu if( !strcmp( cmd, "servermenu" ) ) { diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index db39491..eade857 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -542,22 +542,6 @@ void Cmd_Noclip_f( gentity_t *ent ) } -/* -================== -Cmd_LevelShot_f - -This is just to help generate the level pictures -for the menus. It goes to the intermission immediately -and sends over a command to the client to resize the view, -hide the scoreboard, and take a special screenshot -================== -*/ -void Cmd_LevelShot_f( gentity_t *ent ) -{ - BeginIntermission( ); - trap_SendServerCommand( ent - g_entities, "clientLevelShot" ); -} - /* ================= Cmd_Kill_f @@ -5354,7 +5338,6 @@ commands_t cmds[ ] = { { "god", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_God_f }, { "notarget", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_Notarget_f }, { "noclip", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_Noclip_f }, - { "levelshot", CMD_CHEAT, Cmd_LevelShot_f }, { "setviewpos", CMD_CHEAT, Cmd_SetViewpos_f }, { "destroy", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_Destroy_f }, -- cgit