mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-10 19:32:32 +00:00
Crosshair color preview. RDF_NOFOG flag for scene2d (not used by renderer yet).
This commit is contained in:
parent
76965e1168
commit
701683aa09
2 changed files with 20 additions and 5 deletions
|
@ -45,6 +45,7 @@
|
||||||
// refdef flags
|
// refdef flags
|
||||||
#define RDF_NOWORLDMODEL 1 // used for player configuration screen
|
#define RDF_NOWORLDMODEL 1 // used for player configuration screen
|
||||||
#define RDF_HYPERSPACE 4 // teleportation effect
|
#define RDF_HYPERSPACE 4 // teleportation effect
|
||||||
|
#define RDF_NOFOG 8
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
|
|
|
@ -3038,8 +3038,15 @@ static void UI_DrawRedBlue(rectDef_t * rect, float scale, vec4_t color, int text
|
||||||
Text_Paint(rect->x, rect->y, scale, color, (uiInfo.redBlue == 0) ? "1 (Red)" : "2 (Blue)", 0, 0, 0, textStyle, qfalse);
|
Text_Paint(rect->x, rect->y, scale, color, (uiInfo.redBlue == 0) ? "1 (Red)" : "2 (Blue)", 0, 0, 0, textStyle, qfalse);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UI_DrawCrosshair(rectDef_t * rect, float scale, vec4_t color)
|
static void UI_DrawCrosshair(rectDef_t * rect, float scale)
|
||||||
{
|
{
|
||||||
|
vec4_t color;
|
||||||
|
|
||||||
|
color[0] = trap_Cvar_VariableValue("cg_RQ3_crosshairColorR");
|
||||||
|
color[1] = trap_Cvar_VariableValue("cg_RQ3_crosshairColorG");
|
||||||
|
color[2] = trap_Cvar_VariableValue("cg_RQ3_crosshairColorB");
|
||||||
|
color[3] = trap_Cvar_VariableValue("cg_RQ3_crosshairColorA");
|
||||||
|
|
||||||
trap_R_SetColor(color);
|
trap_R_SetColor(color);
|
||||||
|
|
||||||
if (uiInfo.currentCrosshair < 0 || uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
|
if (uiInfo.currentCrosshair < 0 || uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
|
||||||
|
@ -4022,7 +4029,7 @@ static void UI_OwnerDraw(itemDef_t *item, float x, float y, float w, float h, fl
|
||||||
UI_DrawRedBlue(&rect, scale, color, textStyle);
|
UI_DrawRedBlue(&rect, scale, color, textStyle);
|
||||||
break;
|
break;
|
||||||
case UI_CROSSHAIR:
|
case UI_CROSSHAIR:
|
||||||
UI_DrawCrosshair(&rect, scale, color);
|
UI_DrawCrosshair(&rect, scale);
|
||||||
break;
|
break;
|
||||||
//Makro - adding SSG crosshair
|
//Makro - adding SSG crosshair
|
||||||
case UI_SSG_CROSSHAIR:
|
case UI_SSG_CROSSHAIR:
|
||||||
|
@ -7113,6 +7120,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
|
||||||
static char info[MAX_STRING_CHARS];
|
static char info[MAX_STRING_CHARS];
|
||||||
static char hostname[1024];
|
static char hostname[1024];
|
||||||
static char clientBuff[32];
|
static char clientBuff[32];
|
||||||
|
static char clientIdStr[32];
|
||||||
static int lastColumn = -1;
|
static int lastColumn = -1;
|
||||||
static int lastTime = 0;
|
static int lastTime = 0;
|
||||||
|
|
||||||
|
@ -7202,11 +7210,17 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan
|
||||||
}
|
}
|
||||||
} else if (feederID == FEEDER_PLAYER_LIST) {
|
} else if (feederID == FEEDER_PLAYER_LIST) {
|
||||||
if (index >= 0 && index < uiInfo.playerCount) {
|
if (index >= 0 && index < uiInfo.playerCount) {
|
||||||
|
if (column != 1)
|
||||||
return uiInfo.playerNames[index];
|
return uiInfo.playerNames[index];
|
||||||
|
Com_sprintf(clientIdStr, sizeof(clientIdStr), "%d", index);
|
||||||
|
return clientIdStr;
|
||||||
}
|
}
|
||||||
} else if (feederID == FEEDER_TEAM_LIST) {
|
} else if (feederID == FEEDER_TEAM_LIST) {
|
||||||
if (index >= 0 && index < uiInfo.myTeamCount) {
|
if (index >= 0 && index < uiInfo.myTeamCount) {
|
||||||
|
if (column != 1)
|
||||||
return uiInfo.teamNames[index];
|
return uiInfo.teamNames[index];
|
||||||
|
Com_sprintf(clientIdStr, sizeof(clientIdStr), "%d", index);
|
||||||
|
return clientIdStr;
|
||||||
}
|
}
|
||||||
} else if (feederID == FEEDER_MODS) {
|
} else if (feederID == FEEDER_MODS) {
|
||||||
if (index >= 0 && index < uiInfo.modCount) {
|
if (index >= 0 && index < uiInfo.modCount) {
|
||||||
|
@ -8126,7 +8140,7 @@ void _UI_Init(qboolean inGameLoad)
|
||||||
uiInfo.uiDC.scene2D.height = 480 * uiInfo.uiDC.yscale ;
|
uiInfo.uiDC.scene2D.height = 480 * uiInfo.uiDC.yscale ;
|
||||||
uiInfo.uiDC.scene2D.fov_x = 90;
|
uiInfo.uiDC.scene2D.fov_x = 90;
|
||||||
uiInfo.uiDC.scene2D.fov_y = 73.739795291688f;
|
uiInfo.uiDC.scene2D.fov_y = 73.739795291688f;
|
||||||
uiInfo.uiDC.scene2D.rdflags = RDF_NOWORLDMODEL;
|
uiInfo.uiDC.scene2D.rdflags = RDF_NOWORLDMODEL | RDF_NOFOG;
|
||||||
AxisClear(uiInfo.uiDC.scene2D.viewaxis);
|
AxisClear(uiInfo.uiDC.scene2D.viewaxis);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue