From da790187406bbc1c573e90a046ad589c67d196d9 Mon Sep 17 00:00:00 2001 From: y2keeth Date: Mon, 11 Jan 2016 16:46:19 -0500 Subject: [PATCH 1/3] Enables muzzle flashes weapon world lighting enabled --- neo/renderer/tr_frontend_addlights.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neo/renderer/tr_frontend_addlights.cpp b/neo/renderer/tr_frontend_addlights.cpp index d3fa8346..63683f04 100644 --- a/neo/renderer/tr_frontend_addlights.cpp +++ b/neo/renderer/tr_frontend_addlights.cpp @@ -405,10 +405,10 @@ static void R_AddSingleLight( viewLight_t* vLight ) // A more general solution would be to have an allowLightOnEntityID field. // HACK: the armor-mounted flashlight is a private spot light, which is probably // wrong -- you would expect to see them in multiplayer. - if( light->parms.allowLightInViewID && light->parms.pointLight && !eParms.weaponDepthHack ) - { - continue; - } + // if( light->parms.allowLightInViewID && light->parms.pointLight && !eParms.weaponDepthHack ) + // { + // continue; + // } // non-shadow casting entities don't need to be added if they aren't // directly visible From 321dda8b8fae73bb061baecdab97ee154f5ffb26 Mon Sep 17 00:00:00 2001 From: y2keeth Date: Sun, 26 Jun 2016 21:05:41 -0400 Subject: [PATCH 2/3] increase max_decals and deffered decals, shotgun now has full impacts --- neo/renderer/ModelDecal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neo/renderer/ModelDecal.h b/neo/renderer/ModelDecal.h index cabf9bc2..aa9729b3 100644 --- a/neo/renderer/ModelDecal.h +++ b/neo/renderer/ModelDecal.h @@ -47,13 +47,13 @@ If you have questions concerning this license or the applicable additional terms static const int NUM_DECAL_BOUNDING_PLANES = 6; #ifdef ID_PC -static const int MAX_DEFERRED_DECALS = 8; +static const int MAX_DEFERRED_DECALS = 16; static const int DEFFERED_DECAL_TIMEOUT = 1000; // don't create a decal if it wasn't visible within the first second -static const int MAX_DECALS = 64; +static const int MAX_DECALS = 128; #else -static const int MAX_DEFERRED_DECALS = 4; +static const int MAX_DEFERRED_DECALS = 16; static const int DEFFERED_DECAL_TIMEOUT = 200; // don't create a decal if it wasn't visible within the first 200 milliseconds -static const int MAX_DECALS = 32; +static const int MAX_DECALS = 128; #endif static const int MAX_DECAL_VERTS = 3 + NUM_DECAL_BOUNDING_PLANES + 3 + 6; // 3 triangle verts clipped NUM_DECAL_BOUNDING_PLANES + 3 times (plus 6 for safety) static const int MAX_DECAL_INDEXES = ( MAX_DECAL_VERTS - 2 ) * 3; From 7b5fc61a515e565508ee6d305f7656e03cc472f9 Mon Sep 17 00:00:00 2001 From: y2keeth Date: Wed, 29 Jun 2016 18:37:59 -0400 Subject: [PATCH 3/3] added option to game setting to turn on or off muzzleflashes --- neo/d3xp/menus/MenuScreen.h | 1 + neo/d3xp/menus/MenuScreen_Shell_GameOptions.cpp | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/neo/d3xp/menus/MenuScreen.h b/neo/d3xp/menus/MenuScreen.h index 35e1ad27..554faec1 100644 --- a/neo/d3xp/menus/MenuScreen.h +++ b/neo/d3xp/menus/MenuScreen.h @@ -1015,6 +1015,7 @@ public: GAME_FIELD_AIM_ASSIST, GAME_FIELD_ALWAYS_SPRINT, GAME_FIELD_FLASHLIGHT_SHADOWS, + GAME_FIELD_MUZZLE_FLASHES, MAX_GAME_FIELDS }; diff --git a/neo/d3xp/menus/MenuScreen_Shell_GameOptions.cpp b/neo/d3xp/menus/MenuScreen_Shell_GameOptions.cpp index d7f0aca1..816bbbf7 100644 --- a/neo/d3xp/menus/MenuScreen_Shell_GameOptions.cpp +++ b/neo/d3xp/menus/MenuScreen_Shell_GameOptions.cpp @@ -125,6 +125,14 @@ void idMenuScreen_Shell_GameOptions::Initialize( idMenuHandler* data ) control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() ); control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, options->GetChildren().Num() ); options->AddChild( control ); + + control = new(TAG_SWF)idMenuWidget_ControlButton(); + control->SetOptionType( OPTION_SLIDER_TOGGLE ); + control->SetLabel( "muzzle flashes" ); + control->SetDataSource( &systemData, idMenuDataSource_GameSettings::GAME_FIELD_MUZZLE_FLASHES ); + control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() ); + control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_PRESS_FOCUSED, options->GetChildren().Num() ); + options->AddChild( control ); options->AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_DOWN_START_REPEATER, WIDGET_EVENT_SCROLL_DOWN ) ); options->AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( new( TAG_SWF ) idWidgetActionHandler( options, WIDGET_ACTION_EVENT_SCROLL_UP_START_REPEATER, WIDGET_EVENT_SCROLL_UP ) ); @@ -294,6 +302,7 @@ extern idCVar aa_targetAimAssistEnable; extern idCVar in_alwaysRun; extern idCVar g_checkpoints; extern idCVar g_weaponShadows; +extern idCVar g_muzzleFlash; /* ======================== @@ -320,6 +329,7 @@ void idMenuScreen_Shell_GameOptions::idMenuDataSource_GameSettings::LoadData() fields[ GAME_FIELD_AIM_ASSIST ].SetBool( aa_targetAimAssistEnable.GetBool() ); fields[ GAME_FIELD_ALWAYS_SPRINT ].SetBool( in_alwaysRun.GetBool() ); fields[ GAME_FIELD_FLASHLIGHT_SHADOWS ].SetBool( g_weaponShadows.GetBool() ); + fields[ GAME_FIELD_MUZZLE_FLASHES ].SetBool( g_muzzleFlash.GetBool() ); originalFields = fields; } @@ -340,6 +350,7 @@ void idMenuScreen_Shell_GameOptions::idMenuDataSource_GameSettings::CommitData() aa_targetAimAssistEnable.SetBool( fields[ GAME_FIELD_AIM_ASSIST ].ToBool() ); in_alwaysRun.SetBool( fields[ GAME_FIELD_ALWAYS_SPRINT ].ToBool() ); g_weaponShadows.SetBool( fields[ GAME_FIELD_FLASHLIGHT_SHADOWS ].ToBool() ); + g_muzzleFlash.SetBool( fields[ GAME_FIELD_MUZZLE_FLASHES ].ToBool() ); cvarSystem->SetModifiedFlags( CVAR_ARCHIVE ); @@ -406,6 +417,10 @@ bool idMenuScreen_Shell_GameOptions::idMenuDataSource_GameSettings::IsDataChange { return true; } - + + if (fields[ GAME_FIELD_MUZZLE_FLASHES ].ToBool() != originalFields[ GAME_FIELD_MUZZLE_FLASHES ].ToBool() ) + { + return true; + } return false; } \ No newline at end of file