LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JA Coding (http://www.lucasforums.com/forumdisplay.php?f=539)
-   -   transparent duels? (http://www.lucasforums.com/showthread.php?t=167678)

bzug0 07-17-2006 06:40 PM

transparent duels?
 
Can anyone know how can I add some transparency to private duelers :s

Or at least some tips from where to start.

ensiform 07-17-2006 06:42 PM

well JA+ has a serverinfo cvar jp_duelAlpha or something, and the client transmits that i think in the cgs_t struct, then when applying the duel shader, it sets that value to the 'a' (alpha) value of the shader.

bzug0 07-18-2006 06:31 PM

Still not tested yet but in cg_players.c and cg_player I found

Code:

        if (!cg.snap->ps.duelInProgress && cent->currentState.bolt1 && !(cent->currentState.eFlags & EF_DEAD) && cent->currentState.number != cg.snap->ps.clientNum && (!cg.snap->ps.duelInProgress || cg.snap->ps.duelIndex != cent->currentState.number))
        {
                legs.shaderRGBA[0] = 50;
                legs.shaderRGBA[1] = 50;
                legs.shaderRGBA[2] = 255;
               
                legs.renderfx &= ~RF_RGB_TINT;
                legs.renderfx &= ~RF_FORCE_ENT_ALPHA;
                legs.customShader = cgs.media.forceSightBubble;
               
                trap_R_AddRefEntityToScene( &legs );
        }

adding this line
Code:

legs.shaderRGBA[3] = somealphavalue;
might work, or something around this.

ensiform 07-18-2006 06:55 PM

aye.

bzug0 07-19-2006 09:50 AM

I'm happy :D


...xD

bzug0 07-19-2006 05:47 PM

not happy again :(

changing this value(legs.shaderRGBA[3]) doesn't seems to work... maybe its missing something


All times are GMT -4. The time now is 10:11 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.