From cde3a596eec86bb27e00e764e582cd65bdc7765a Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Thu, 6 May 2021 10:03:06 +0200 Subject: [PATCH] Added editLights cmd as shortcut for g_editEntityMode 1 --- base/devtools.cfg | 6 +++--- neo/d3xp/gamesys/Class.cpp | 12 ++++++++++++ neo/d3xp/gamesys/Class.h | 1 + neo/d3xp/gamesys/SysCmds.cpp | 3 ++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/base/devtools.cfg b/base/devtools.cfg index 946e8dd2..8376648f 100644 --- a/base/devtools.cfg +++ b/base/devtools.cfg @@ -3,12 +3,12 @@ bind "I" "toggle r_showSurfaceInfo" bind "N" "noclip" bind "M" "spawn moveable_macbethchart" -bind "F1" "toggle r_showViewEnvprobes 1 2 0" +bind "F1" "toggle r_showViewEnvprobes 1 2 3 0" bind "F2" "toggle r_showTris 1 2 3 0" -bind "F3" "toggle r_forceAmbient 0.2 0.3 0.4 0.5 0" +bind "F3" "toggle r_forceAmbient 0.5 0" bind "F4" "toggle r_skipInteractions" bind "F5" "savegame quick" -bind "F6" "toggle r_hdrDebug" +bind "F6" "toggle r_showLightGrid 1 3 4 0" bind "F7" "toggle r_useSSAO" bind "F8" "toggle r_useFilmicPostProcessing" bind "F9" "loadgame quick" diff --git a/neo/d3xp/gamesys/Class.cpp b/neo/d3xp/gamesys/Class.cpp index 4df93379..9937cb92 100644 --- a/neo/d3xp/gamesys/Class.cpp +++ b/neo/d3xp/gamesys/Class.cpp @@ -1427,4 +1427,16 @@ void idClass::ExportScriptEvents_f( const idCmdArgs& args ) delete[] set; } + +void idClass::EditLights_f( const idCmdArgs& args ) +{ + if( g_editEntityMode.GetInteger() != 1 ) + { + g_editEntityMode.SetInteger( 1 ); + } + else + { + g_editEntityMode.SetInteger( 0 ); + } +} // RB end \ No newline at end of file diff --git a/neo/d3xp/gamesys/Class.h b/neo/d3xp/gamesys/Class.h index dbef0773..84347213 100644 --- a/neo/d3xp/gamesys/Class.h +++ b/neo/d3xp/gamesys/Class.h @@ -297,6 +297,7 @@ public: static void ListClasses_f( const idCmdArgs& args ); // RB begin static void ExportScriptEvents_f( const idCmdArgs& args ); + static void EditLights_f( const idCmdArgs& args ); // RB end static idClass* CreateInstance( const char* name ); static int GetNumTypes() diff --git a/neo/d3xp/gamesys/SysCmds.cpp b/neo/d3xp/gamesys/SysCmds.cpp index 7f4a1cb9..4dcf66f0 100644 --- a/neo/d3xp/gamesys/SysCmds.cpp +++ b/neo/d3xp/gamesys/SysCmds.cpp @@ -2738,7 +2738,8 @@ void idGameLocal::InitConsoleCommands() cmdSystem->AddCommand( "closeViewNotes", Cmd_CloseViewNotes_f, CMD_FL_GAME | CMD_FL_CHEAT, "close the view showing any notes for this map" ); // RB begin - cmdSystem->AddCommand( "exportScriptEvents", idClass::ExportScriptEvents_f, CMD_FL_GAME | CMD_FL_CHEAT, "update script/doom_events.script" ); + cmdSystem->AddCommand( "exportScriptEvents", idClass::ExportScriptEvents_f, CMD_FL_GAME | CMD_FL_TOOL, "update script/doom_events.script" ); + cmdSystem->AddCommand( "editLights", idClass::EditLights_f, CMD_FL_GAME | CMD_FL_TOOL, "launches the in-game Light Editor" ); // RB end // multiplayer client commands ( replaces old impulses stuff )