JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Ability to toggle certain client side effects #849

Open ensiform opened 8 years ago

ensiform commented 8 years ago

I think we should have a bitflagged cvar that allows players to toggle certain client side effects in our mod code that doesn't require using cg_renderToTextureFX 0 to shut off all of them at once.

Like, the push blur, player sphere refraction, cloak refract shader, and repeater orb.

dusty22 commented 8 years ago

How can bitflagged cvars be done? I've been wondering this.

shinyquagsire23 commented 8 years ago

@dusty22 Usually for a bitflagged anything, something like

#define SOME_FLAG 0x80

or

#define SOME_FLAG BIT(7)

and then

if(some_var_or_something & SOME_FLAG)
{
...
}

usually works pretty OK.