diff --git a/.gitignore b/.gitignore index af454130..c7e220fe 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ base/video/ base/wads/ base/renderprogs2/ base/generated/ +base/env/ GPATH GRTAGS diff --git a/neo/d3xp/Game_network.cpp b/neo/d3xp/Game_network.cpp index 57e482c4..81b42a0a 100644 --- a/neo/d3xp/Game_network.cpp +++ b/neo/d3xp/Game_network.cpp @@ -983,8 +983,8 @@ void idGameLocal::ClientReadSnapshot( const idSnapShot& ss ) ent->FlagNewSnapshot(); - // read the class specific data from the snapshot - if( msg.GetRemainingReadBits() > 0 ) + // read the class specific data from the snapshot; SRS - only if network-synced + if( msg.GetRemainingReadBits() > 0 && ent->fl.networkSync ) { ent->ReadFromSnapshot_Ex( msg ); ent->snapshotBits = msg.GetSize(); diff --git a/neo/d3xp/physics/Physics_Player.h b/neo/d3xp/physics/Physics_Player.h index e56b490f..8c3eb4f0 100644 --- a/neo/d3xp/physics/Physics_Player.h +++ b/neo/d3xp/physics/Physics_Player.h @@ -196,7 +196,7 @@ private: waterLevel_t waterLevel; int waterType; - bool clientPusherLocked; + bool clientPusherLocked = false; // SRS - initialize to unlocked at start private: float CmdScale( const usercmd_t& cmd ) const; diff --git a/neo/renderer/ModelDecal.cpp b/neo/renderer/ModelDecal.cpp index e9669f2b..12bdcb34 100644 --- a/neo/renderer/ModelDecal.cpp +++ b/neo/renderer/ModelDecal.cpp @@ -60,6 +60,8 @@ idRenderModelDecal::idRenderModelDecal() : demoSerialWrite( 0 ), demoSerialCurrent( 0 ) { + // SRS - initialize decals so members are defined for logical tests in CreateDecalFromWinding() + memset( decals, 0, sizeof( decals ) ); } /* diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index a09b214c..7fdfe6a9 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -168,7 +168,7 @@ idCVar r_testGammaBias( "r_testGammaBias", "0", CVAR_RENDERER | CVAR_FLOAT, "if idCVar r_lightScale( "r_lightScale", "3", CVAR_ARCHIVE | CVAR_RENDERER | CVAR_FLOAT, "all light intensities are multiplied by this", 0, 100 ); idCVar r_flareSize( "r_flareSize", "1", CVAR_RENDERER | CVAR_FLOAT, "scale the flare deforms from the material def" ); -idCVar r_useScissor( "r_useScissor", "1", CVAR_RENDERER | CVAR_BOOL, "scissor clip as portals and lights are processed" ); +idCVar r_useScissor( "r_useScissor", "1", CVAR_RENDERER | CVAR_BOOL | CVAR_NOCHEAT, "scissor clip as portals and lights are processed" ); idCVar r_useLightDepthBounds( "r_useLightDepthBounds", "1", CVAR_RENDERER | CVAR_BOOL, "use depth bounds test on lights to reduce both shadow and interaction fill" ); idCVar r_useShadowDepthBounds( "r_useShadowDepthBounds", "1", CVAR_RENDERER | CVAR_BOOL, "use depth bounds test on individual shadow volumes to reduce shadow fill" ); diff --git a/neo/renderer/RenderWorld_envprobes.cpp b/neo/renderer/RenderWorld_envprobes.cpp index 287b0c23..32bda966 100644 --- a/neo/renderer/RenderWorld_envprobes.cpp +++ b/neo/renderer/RenderWorld_envprobes.cpp @@ -1,4 +1,4 @@ -/* +/* =========================================================================== Doom 3 BFG Edition GPL Source Code @@ -1148,7 +1148,7 @@ CONSOLE_COMMAND( bakeEnvironmentProbes, "Bake environment probes", NULL ) idLib::Printf( "----------------------------------\n" ); idLib::Printf( "Processed %i light probes\n", totalProcessedProbes ); - common->Printf( "Baked SH irradiance and GGX mip maps in %5.1f seconds\n\n", ( totalEnd - totalStart ) / ( 1000.0f ) ); + common->Printf( "Baked SH irradiance and GGX mip maps in %5.1f minutes\n\n", ( totalEnd - totalStart ) / ( 1000.0f * 60 ) ); } CONSOLE_COMMAND( makeBrdfLUT, "make a GGX BRDF lookup table", NULL ) diff --git a/neo/renderer/tr_frontend_addlights.cpp b/neo/renderer/tr_frontend_addlights.cpp index 062d107d..413d047b 100644 --- a/neo/renderer/tr_frontend_addlights.cpp +++ b/neo/renderer/tr_frontend_addlights.cpp @@ -38,7 +38,7 @@ extern idCVar r_forceShadowCaps; extern idCVar r_useShadowPreciseInsideTest; idCVar r_useAreasConnectedForShadowCulling( "r_useAreasConnectedForShadowCulling", "2", CVAR_RENDERER | CVAR_INTEGER, "cull entities cut off by doors" ); -idCVar r_useParallelAddLights( "r_useParallelAddLights", "1", CVAR_RENDERER | CVAR_BOOL, "aadd all lights in parallel with jobs" ); +idCVar r_useParallelAddLights( "r_useParallelAddLights", "1", CVAR_RENDERER | CVAR_BOOL | CVAR_NOCHEAT, "aadd all lights in parallel with jobs" ); /* ============================ diff --git a/neo/renderer/tr_frontend_addmodels.cpp b/neo/renderer/tr_frontend_addmodels.cpp index 75b09e99..64e9d68b 100644 --- a/neo/renderer/tr_frontend_addmodels.cpp +++ b/neo/renderer/tr_frontend_addmodels.cpp @@ -35,8 +35,8 @@ If you have questions concerning this license or the applicable additional terms idCVar r_skipStaticShadows( "r_skipStaticShadows", "0", CVAR_RENDERER | CVAR_BOOL, "skip static shadows" ); idCVar r_skipDynamicShadows( "r_skipDynamicShadows", "0", CVAR_RENDERER | CVAR_BOOL, "skip dynamic shadows" ); -idCVar r_useParallelAddModels( "r_useParallelAddModels", "1", CVAR_RENDERER | CVAR_BOOL, "add all models in parallel with jobs" ); -idCVar r_useParallelAddShadows( "r_useParallelAddShadows", "1", CVAR_RENDERER | CVAR_INTEGER, "0 = off, 1 = threaded", 0, 1 ); +idCVar r_useParallelAddModels( "r_useParallelAddModels", "1", CVAR_RENDERER | CVAR_BOOL | CVAR_NOCHEAT, "add all models in parallel with jobs" ); +idCVar r_useParallelAddShadows( "r_useParallelAddShadows", "1", CVAR_RENDERER | CVAR_INTEGER | CVAR_NOCHEAT, "0 = off, 1 = threaded", 0, 1 ); idCVar r_forceShadowCaps( "r_forceShadowCaps", "0", CVAR_RENDERER | CVAR_BOOL, "0 = skip rendering shadow caps if view is outside shadow volume, 1 = always render shadow caps" ); // RB begin idCVar r_forceShadowMapsOnAlphaTestedSurfaces( "r_forceShadowMapsOnAlphaTestedSurfaces", "1", CVAR_RENDERER | CVAR_BOOL, "0 = same shadowing as with stencil shadows, 1 = ignore noshadows for alpha tested materials" ); diff --git a/neo/sys/sys_lobby.cpp b/neo/sys/sys_lobby.cpp index 125ff7f7..ea543354 100644 --- a/neo/sys/sys_lobby.cpp +++ b/neo/sys/sys_lobby.cpp @@ -118,6 +118,20 @@ idLobby::idLobby() connectIsFromInvite = false; } +/* +======================== +idLobby::~idLobby +======================== +*/ +idLobby::~idLobby() +{ + // SRS - cleanup any allocations made for multiplayer networking support + Mem_Free( objMemory ); + objMemory = NULL; + Mem_Free( lzwData ); + lzwData = NULL; +} + /* ======================== idLobby::Initialize @@ -330,15 +344,6 @@ void idLobby::Shutdown( bool retainMigrationInfo, bool skipGoodbye ) } } - // SRS - cleanup any allocations made for multiplayer networking support - if( objMemory ) - { - Mem_Free( objMemory ); - objMemory = NULL; - Mem_Free( lzwData ); - lzwData = NULL; - } - state = STATE_IDLE; } diff --git a/neo/sys/sys_lobby.h b/neo/sys/sys_lobby.h index 38473f45..68206a3e 100644 --- a/neo/sys/sys_lobby.h +++ b/neo/sys/sys_lobby.h @@ -41,6 +41,7 @@ class idLobby : public idLobbyBase { public: idLobby(); + ~idLobby(); enum lobbyType_t { diff --git a/neo/sys/sys_voicechat.cpp b/neo/sys/sys_voicechat.cpp index e2e3ab13..3f729b83 100644 --- a/neo/sys/sys_voicechat.cpp +++ b/neo/sys/sys_voicechat.cpp @@ -48,7 +48,11 @@ void idVoiceChatMgr::Shutdown() // We shouldn't have voice users if everything shutdown correctly assert( talkers.Num() == 0 ); - assert( remoteMachines.Num() == 0 ); + for( int i = remoteMachines.Num() - 1; i >= 0; i-- ) + { + assert( remoteMachines[i].refCount == 0 ); + remoteMachines.RemoveIndex( i ); + } } /* @@ -667,4 +671,4 @@ bool idVoiceChatMgr::HasHeadsetStateChanged( int talkerIndex ) talker.hasHeadsetChanged = false; return ret; -} \ No newline at end of file +}