Skip to content

Commit 2b4c975

Browse files
Unified functionality of g_extrashadows into r_shadows
1 parent a4ab473 commit 2b4c975

File tree

16 files changed

+20
-20
lines changed

16 files changed

+20
-20
lines changed

.github/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,14 @@ Compared to the original _dhewm 3_, the changes of _D3Modding Kit_ worth mention
8080
- D3XP And Game dlls are in one folder.
8181
- WIP Template base for TC Games.
8282
- Update The Sys Console to use different colors and font.
83-
- Restored Footsteps sounds by using Prey 06 Code.
8483
- Set gui_mediumFontLimit and gui_smallFontLimit to "0"
8584
- Added Missing Material Editor models.
8685
- Added .guide Support from Quake 4.
8786
- Refactored MFC Tools.
8887
- Backported fixes from d3xp and merge missed changes in d3xp/ from base/
8988
- Backported Water bullet impact from RoE ( see Examples/ folder for the water particle)
9089
- Made the player be in thirdperson when they die in multiplayer.
91-
- Rename g_showPlayerShadow to g_showExtraShadows and make it default.
90+
- Merge g_showPlayerShadow to r_shadows (Set r_shadows 2 to see it).
9291
- Added decl_warn_duplicates so warnings about duplicated entries are hide.
9392
- Removed TakeNotes system.
9493
- Added doxygen support.

.github/workflows/linux_build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
Copy-Item -Path "output/base" -Destination "output/linux/base" -Recurse
4343
Copy-Item -Path "output/d3xp" -Destination "output/linux/d3xp" -Recurse
4444
Copy-Item -Path "output/libs" -Destination "output/linux/libs" -Recurse
45-
Copy-Item -Path "output/examples" -Destination "output/linux/examples" -Recurse
4645
Copy-Item -Path "blender" -Destination "output/linux/blender" -Recurse
4746
Copy-Item -Path ".github/CHANGELOG.md" -Destination "output/linux"
4847
Copy-Item -Path ".github/CONFIGURATION.md" -Destination "output/linux"

.github/workflows/windows_build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
cd ${{github.workspace}}
5050
Copy-Item -Path "output/base" -Destination "output/windows/base" -Recurse
5151
Copy-Item -Path "output/d3xp" -Destination "output/windows/d3xp" -Recurse
52-
Copy-Item -Path "output/examples" -Destination "output/windows/examples" -Recurse
5352
Copy-Item -Path "blender" -Destination "output/windows/blender" -Recurse
5453
Copy-Item -Path ".github/CHANGELOG.md" -Destination "output/windows"
5554
Copy-Item -Path ".github/CONFIGURATION.md" -Destination "output/windows"

neo/d3xp/Player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7583,7 +7583,7 @@ void idPlayer::Think( void ) {
75837583
}
75847584
}
75857585

7586-
if ( g_showExtraShadows.GetBool() ) {
7586+
if ( cvarSystem->GetCVarInteger( "r_shadows" ) == 2 ) {
75877587
renderEntity.suppressShadowInViewID = 0;
75887588
if ( headRenderEnt ) {
75897589
headRenderEnt->suppressShadowInViewID = 0;
@@ -9457,7 +9457,7 @@ void idPlayer::ClientPredictionThink( void ) {
94579457
}
94589458
}
94599459

9460-
if ( g_showExtraShadows.GetBool() ) {
9460+
if ( cvarSystem->GetCVarInteger( "r_shadows" ) == 2 ) {
94619461
renderEntity.suppressShadowInViewID = 0;
94629462
if ( headRenderEnt ) {
94639463
headRenderEnt->suppressShadowInViewID = 0;

neo/d3xp/Weapon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ void idWeapon::PresentWeapon( bool showViewModel ) {
20972097
if ( worldModel.GetEntity() && worldModel.GetEntity()->GetRenderEntity() ) {
20982098
// deal with the third-person visible world model
20992099
// don't show shadows of the world model in first person
2100-
if ( g_showExtraShadows.GetBool() || pm_thirdPerson.GetBool() ) {
2100+
if ( cvarSystem->GetCVarInteger( "r_shadows" ) == 2 || pm_thirdPerson.GetBool() ) {
21012101
worldModel.GetEntity()->GetRenderEntity()->suppressShadowInViewID = 0;
21022102
} else {
21032103
worldModel.GetEntity()->GetRenderEntity()->suppressShadowInViewID = owner->entityNumber+1;

neo/d3xp/gamesys/SysCvar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ idCVar pm_thirdPersonDeath( "pm_thirdPersonDeath", "0", CVAR_GAME | CVAR_NE
334334
idCVar pm_modelView( "pm_modelView", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "draws camera from POV of player model (1 = always, 2 = when dead)", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
335335
idCVar pm_airTics( "pm_air", "1800", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "how long in milliseconds the player can go without air before he starts taking damage" );
336336

337-
idCVar g_showExtraShadows( "g_showExtraShadows", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables extra shadows for player model and world model weapon" );
338337
idCVar g_showHud( "g_showHud", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "" );
339338
idCVar g_showProjectilePct( "g_showProjectilePct", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables display of player hit percentage" );
340339
idCVar g_showBrass( "g_showBrass", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables ejected shells from weapon" );

neo/d3xp/gamesys/SysCvar.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ extern idCVar pm_thirdPersonDeath;
211211
extern idCVar pm_modelView;
212212
extern idCVar pm_airTics;
213213

214-
extern idCVar g_showExtraShadows;
215214
extern idCVar g_showHud;
216215
extern idCVar g_showProjectilePct;
217216
extern idCVar g_showBrass;

neo/framework/Common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,9 +1527,9 @@ void Com_ExecMachineSpec_f( const idCmdArgs &args ) {
15271527
OSX_GetCPUIdentification( cpuId, oldArch );
15281528
bool isFX5200 = vendorId == 0x10DE && ( deviceId & 0x0FF0 ) == 0x0320;
15291529
if ( oldArch && ( com_machineSpec.GetInteger() == 0 ) ) {
1530-
cvarSystem->SetCVarBool( "r_shadows", false, CVAR_ARCHIVE );
1530+
cvarSystem->SetCVarInteger( "r_shadows", 0, CVAR_ARCHIVE );
15311531
} else {
1532-
cvarSystem->SetCVarBool( "r_shadows", true, CVAR_ARCHIVE );
1532+
cvarSystem->SetCVarInteger( "r_shadows", 1, CVAR_ARCHIVE );
15331533
}
15341534
#endif
15351535
}

neo/framework/Dhewm3SettingsMenu.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,14 @@ static CVarOption videoOptionsImmediately[] = {
17111711
AddCVarOptionTooltips( cvar );
17121712
}),
17131713
CVarOption( "r_skipNewAmbient", "Disable High Quality Special Effects", OT_BOOL ),
1714-
CVarOption( "r_shadows", "Enable Shadows", OT_BOOL ),
1714+
CVarOption( "r_shadows", []( idCVar& cvar ) {
1715+
// "Enable Shadows. 0 = No Shadows, 1 = Draw Shadows (default), 2 = Shadows + Extra Shadows"
1716+
int shadows = idMath::ClampInt( 0, 2, cvar.GetInteger() );
1717+
if ( ImGui::Combo( "Enable Shadows", &shadows, "No Shadows\0Draw Shadows\0Shadows + Extra Shadows\0" ) ) {
1718+
cvar.SetInteger( shadows );
1719+
}
1720+
AddTooltip( "r_shadows" );
1721+
} ),
17151722
CVarOption( "r_skipSpecular", "Disable Specular", OT_BOOL ),
17161723
CVarOption( "r_skipBump", "Disable Bump Maps", OT_BOOL ),
17171724

neo/game/Player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6462,7 +6462,7 @@ void idPlayer::Think( void ) {
64626462
}
64636463
}
64646464

6465-
if ( g_showExtraShadows.GetBool() ) {
6465+
if ( cvarSystem->GetCVarInteger( "r_shadows" ) == 2 ) {
64666466
renderEntity.suppressShadowInViewID = 0;
64676467
if ( headRenderEnt ) {
64686468
headRenderEnt->suppressShadowInViewID = 0;
@@ -7970,7 +7970,7 @@ void idPlayer::ClientPredictionThink( void ) {
79707970
}
79717971
}
79727972

7973-
if ( g_showExtraShadows.GetBool() ) {
7973+
if ( cvarSystem->GetCVarInteger( "r_shadows" ) == 2 ) {
79747974
renderEntity.suppressShadowInViewID = 0;
79757975
if ( headRenderEnt ) {
79767976
headRenderEnt->suppressShadowInViewID = 0;

0 commit comments

Comments
 (0)