vloup / sgfork

Automatically exported from code.google.com/p/sgfork
GNU General Public License v2.0
0 stars 1 forks source link

Crosshair options #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To make crosshair changeable.

The size, the shape, the color and transparency are required!

Original issue reported on code.google.com by igorpana...@gmail.com on 21 Aug 2009 at 9:42

GoogleCodeExporter commented 9 years ago
Accepted.
I'll do it after some clean up work will be done.

Original comment by igorpana...@gmail.com on 21 Aug 2009 at 10:53

GoogleCodeExporter commented 9 years ago
i like the solution from Warsow (a q2-engine-based game)

there it is possible to set two crosshairs at the same time with different 
sizes and
colors

this makes it possible to combine two crosshairs to get one that you really 
like to
play with

e.g. when there's a cross and a circle available as crosshairs, you are able to
combine those two shapes so that you get a red tiny cross in the center, and a 
yellow
circle around it

having the possibility to give those crosshairs different transparencies would 
be
neat aswell

Original comment by mortijs-...@yahoo.de on 22 Aug 2009 at 10:53

GoogleCodeExporter commented 9 years ago
Will do.

Original comment by igorpana...@gmail.com on 22 Aug 2009 at 12:31

GoogleCodeExporter commented 9 years ago
r35.
Done initial work.
Added 20 crosshairs (the copies for now).
10 for 1st and 10 for 2nd.
The variables:
cg_crosshairDrawFriend;
cg_crosshair1FriendColor;
cg_crosshair1Color;
cg_drawCrosshair1;
cg_crosshair1PickUpPulse;
cg_crosshair1WidthRatio;
cg_crosshair1Transparency;
cg_crosshair2Color;
cg_drawCrosshair2;
cg_crosshair2FriendColor;
cg_crosshair2PickUpPulse;
cg_crosshair2WidthRatio;
cg_crosshair2Transparency;
cg_crosshair1X;
cg_crosshair1Y;
cg_crosshair1Size;
cg_crosshair1Health;
cg_crosshair1HealthColor1;
cg_crosshair1HealthColor2;
cg_crosshair2X;
cg_crosshair2Y;
cg_crosshair2Size;
cg_crosshair2Health;
cg_crosshair2HealthColor1;
cg_crosshair2HealthColor2;
cg_crosshair1OpponentColor
cg_crosshair2OpponentColor
ui_drawCrosshair1;
ui_drawCrosshair2;

Also fixed (with torhu help :)):
    // trace through glass
    // FIXME: doesn't work through more than one level of glass
    if ( trace.surfaceFlags & SURF_GLASS ) {
            CG_Trace( &trace, start, vec3_origin, vec3_origin,
                      end, trace.entityNum, CONTENTS_SOLID|CONTENTS_BODY 
);

    }

UI is not adapted yet

Original comment by igorpana...@gmail.com on 23 Aug 2009 at 7:07

GoogleCodeExporter commented 9 years ago
cg_crosshair1OpponentColor is doubtable option..
Maybe we should restrict it in g_allowOpponentColor.

Things to add:
crosshair must represent spread (on/off)
(?not my request)crosshair pulse on hit (on/off)
UI support for change crosshairs and theirs colors.

Also to check the two crosshairs code. A lot of stuff is copy-paste for them. 
Maybe 
there is a way to do it in a shorter way.

Original comment by igorpana...@gmail.com on 23 Aug 2009 at 7:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Replace:
color[0] = color1[0];
color[1] = color1[1];
color[2] = color1[2];
color[3] = color1[3];
->
Vector4Copy(color1,color);

Blocked by issue 56.

Original comment by igorpana...@gmail.com on 11 Sep 2009 at 6:05

GoogleCodeExporter commented 9 years ago
Fix:
        if(cgs.gametype >= GT_TEAM && cg.snap->ps.persistant[PERS_TEAM] < 
TEAM_SPECTATOR &&
                cgs.clientinfo[trace.entityNum].team == cg.snap-
>ps.persistant[PERS_TEAM]) {
                    // player is on same team
                    *changeCrosshairFlags |= 
CHANGE_CROSSHAIR_TEAMMATE;
        } else {
            // player is opponent and alive
            if ( cgs.clientinfo[trace.entityNum].infoValid )
                *changeCrosshairFlags |= CHANGE_CROSSHAIR_OPPONENT;
        }
->
Highlight the opponent only if he is not a spec.

Original comment by igorpana...@gmail.com on 15 Sep 2009 at 8:10