Created attachment 3558[details]
Suggested solution
Undefined behavior in shift operation if shift counter is greater or equal 32 (MAX_DLIGHTS atm):
R_RecursiveWorldNode( tr.world->nodes, 15, ( 1 << tr.refdef.num_dlights ) - 1 );
So, for example, on x86 arch ((1<<[volatile]32)-1) produces 0x0 instead of 0xFFFFFFFF because shift counter is masked to 5 bits
Created attachment 3558 [details] Suggested solution Undefined behavior in shift operation if shift counter is greater or equal 32 (MAX_DLIGHTS atm): R_RecursiveWorldNode( tr.world->nodes, 15, ( 1 << tr.refdef.num_dlights ) - 1 ); So, for example, on x86 arch ((1<<[volatile]32)-1) produces 0x0 instead of 0xFFFFFFFF because shift counter is masked to 5 bits