diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 7b1991652..1efb49238 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1086,6 +1086,7 @@ void D_RegisterClientCommands(void) COM_AddCommand("weather", Command_Weather_f); COM_AddCommand("grayscale", Command_Grayscale_f); CV_RegisterVar(&cv_renderhitbox); + CV_RegisterVar(&cv_devmode_screen); #ifdef HAVE_DISCORDRPC CV_RegisterVar(&cv_discordrp); diff --git a/src/m_cheat.c b/src/m_cheat.c index 62a5a2b53..cbeefafb6 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -694,6 +694,9 @@ struct debugFlagNames_s const debug_flag_names[] = {NULL, 0} }; +static CV_PossibleValue_t devmode_screen_t[] = {{1, "MIN"}, {4, "MAX"}, {0, NULL}}; +consvar_t cv_devmode_screen = CVAR_INIT ("devmode_screen", "1", CV_CHEAT, devmode_screen_t, NULL); + void Command_Devmode_f(void) { size_t argc = 0; diff --git a/src/m_cheat.h b/src/m_cheat.h index 331f70563..b272400fe 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -89,6 +89,8 @@ void Command_CauseCfail_f(void); void Command_Dumplua_f(void); #endif +extern consvar_t cv_devmode_screen; + #ifdef __cplusplus } // extern "C" #endif diff --git a/src/st_stuff.c b/src/st_stuff.c index b2d01cc2b..192db029e 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -418,6 +418,9 @@ static void ST_drawDebugInfo(void) { INT32 height = 192; + // devmode_screen = 1..4 + stplyr = &players[displayplayers[min(r_splitscreen, cv_devmode_screen.value - 1)]]; + if (!stplyr->mo) return;