OpenJK icon indicating copy to clipboard operation
OpenJK copied to clipboard

Ability to toggle certain client side effects

Open ensiform opened this issue 9 years ago • 2 comments

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.

ensiform avatar Jun 30 '16 15:06 ensiform

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

dusty22 avatar Jul 11 '16 18:07 dusty22

@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.

shinyquagsire23 avatar Jul 11 '16 23:07 shinyquagsire23