Finally a fix for an old tenebrae problem

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
revelator
Posts: 2609
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Finally a fix for an old tenebrae problem

Post by revelator »

Anyone remember the old problem with tenebrae where the viewmodel would poke through walls and if you enabled depthtesting it broke shadows ?.
Well i fixed it :) and its not even hard.

Open up the solution and search for R_ShouldDrawViewModel, this should pop up quite a few places.

then modify all of those instances to look like this

Code: Select all

    if (R_ShouldDrawViewModel())
    {
        if (gl_calcdepth.value)
        {
            glDepthRange (gldepthmin, gldepthmin + 0.1f * (gldepthmax - gldepthmin));
        }
        R_DrawAliasObjectLight(&cl.viewent, R_DrawAliasBumped);

        if (gl_calcdepth.value)
        {
            //Calc Depth - Eradicator
            glDepthRange (gldepthmin, gldepthmax);
        }
    }
set the cvar gl_calcdepth to 1 as default and recompile the engine, lean back and enjoy tenebrae without this age old bug :).
Productivity is a state of mind.
Post Reply