You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Core/Libraries/Source/WWVegas/WW3D2/dx8rendererdebugger.cpp, line 28-31 (link)
Enable ignores its parameter — debugger can never be disabled
The enable argument is silently dropped; the function unconditionally assigns true, so calling Enable(false) keeps the debugger active. Any call-site that tries to toggle the debugger off will have no effect, leaving it permanently on once activated.
Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8renderer.cpp, line 1862-1937 (link)
D3DRS_NORMALIZENORMALS state leak when debugger skips a mesh
D3DRS_NORMALIZENORMALS is set to TRUE (line 1864) before the debugger guard, but restored to FALSE (line 1931) inside it. When the debugger is enabled and a mesh is disabled via Set_Debugger_Disable, the restore is never reached, leaving D3DRS_NORMALIZENORMALS=TRUE for all subsequent meshes in the frame. This causes incorrect normal-length-dependent lighting on every mesh rendered afterward.
The fix is to move the restore outside the debugger if block (after the closing } at line 1937):
As reported by Greptile:
Core/Libraries/Source/WWVegas/WW3D2/dx8rendererdebugger.cpp, line 28-31 (link)Enableignores its parameter — debugger can never be disabledThe
enableargument is silently dropped; the function unconditionally assignstrue, so callingEnable(false)keeps the debugger active. Any call-site that tries to toggle the debugger off will have no effect, leaving it permanently on once activated.Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8renderer.cpp, line 1862-1937 (link)D3DRS_NORMALIZENORMALSstate leak when debugger skips a meshD3DRS_NORMALIZENORMALSis set toTRUE(line 1864) before the debugger guard, but restored toFALSE(line 1931) inside it. When the debugger is enabled and a mesh is disabled viaSet_Debugger_Disable, the restore is never reached, leavingD3DRS_NORMALIZENORMALS=TRUEfor all subsequent meshes in the frame. This causes incorrect normal-length-dependent lighting on every mesh rendered afterward.The fix is to move the restore outside the debugger
ifblock (after the closing}at line 1937):