Esempio n. 1
0
/*
=================
SCR_DrawSpree
=================
*/
void SCR_DrawSpree(void) {
    
    if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cl.snap.ps.pm_type > 4 || 
        cl_paused->value || !cl_drawSpree->integer || cl.snap.ps.clientNum != clc.clientNum ||
        !Cvar_VariableIntegerValue("cg_draw2d")) {
            return;
    }

    int x;
    int y = 450;
    int spacing = 2;
    int size = 20;
    int width;
    int max = 12;
    int i;

    width = size * cl.spreeCount + spacing * (cl.spreeCount - 1);
    x = 320 - width / 2;
    
    for (i = 0; i < (int)Com_Clamp(0, max, cl.spreeCount); i++) {
        SCR_DrawNamedPic(x, y, size, size, "skull.tga");
        x += spacing + size;
    }

}
/*
=================
SCR_DrawKills
=================
*/
void SCR_DrawKills( void ) {
	if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
		cl.snap.ps.pm_type > 4 ||
		cl_paused->value ||
		!cl_drawKills->integer ||
		cl.snap.ps.clientNum != clc.clientNum ||
		!Cvar_VariableIntegerValue("cg_draw2d"))
		return;

	char killStr[12];
	int x = 53;
	int y = 458;

	if (Cvar_VariableValue("cg_crosshairNamesType") == 0) {
		y = 448;
	}

	if (cl_drawKills->integer == 1 || cl_drawKills->integer == 3) {
		Com_sprintf(killStr, 12, "K:^2%i", cl.currentKills);
		SCR_DrawCondensedString(x, y, 8, killStr, g_color_table[7], qfalse );
	}

	int spacing = 2;
	int size = 16;

	int width;
	int i;
	y = 440;

	if (cl_drawKills->integer > 1) {
		if (cl.currentKills < 6) {
			width = size * cl.currentKills + spacing * (cl.currentKills - 1);
			x = 320 - width / 2;

			for (i = 0; i < cl.currentKills; i++) {
				SCR_DrawNamedPic(x, 450, size, size, "skull.tga");
				x += spacing + size;
			}
		} else {
			SCR_DrawNamedPic(304, 450, size, size, "skull.tga");
			SCR_DrawCondensedString(321, 456, 8, va("x%i", cl.currentKills), g_color_table[7], qfalse);
		}
	}
}
Esempio n. 3
0
/*
=================
SCR_PersistentCrosshair
=================
*/
void SCR_PersistentCrosshair(void) {
    if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
            cl.snap.ps.pm_type > 4 ||
            !cl_persistentcrosshair->integer ||
            !Cvar_VariableIntegerValue("cg_draw2d"))
        return;

    int size = Cvar_VariableIntegerValue("cg_crosshairsize");

    if (cl_persistentcrosshair->integer)
        SCR_DrawNamedPic(320 - size/2, 240 - size/2, size, size, "gfx/crosshairs/static/dot.tga");
}
Esempio n. 4
0
/*
=================
SCR_DrawKills
=================
*/
void SCR_DrawKills( void ) {
    if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ||
            cl.snap.ps.pm_type > 4 ||
            cl_paused->value ||
            !cl_drawKills->integer ||
            cl.snap.ps.clientNum != clc.clientNum ||
            !Cvar_VariableIntegerValue("cg_draw2d") ||
            clc.g_gametype == 9)
        return;

    char killStr[12];
    int x = 50;

    if (cl_drawKills->integer == 1 || cl_drawKills->integer == 3) {
        Com_sprintf(killStr, 12, "K:^2%i", cl.currentKills);
        SCR_DrawFontText(x, cl_hky->integer, cl_size->value, g_color_table[7], killStr, ITEM_TEXTSTYLE_SHADOWED);
    }


    int spacing = 2;
    int size = 16;

    int width;
    int i;

    if (cl_drawKills->integer > 1) {
        if (cl.currentKills < 6) {
            width = size * cl.currentKills + spacing * (cl.currentKills - 1);
            x = 320 - width / 2;

            for (i = 0; i < cl.currentKills; i++) {
                SCR_DrawNamedPic(x, 450, size, size, "skull.tga");
                x += spacing + size;
            }
        } else {
            SCR_DrawNamedPic(304, 450, size, size, "skull.tga");
            SCR_DrawCondensedString(321, 456, 8, va("x%i", cl.currentKills), g_color_table[7], qfalse);
        }
    }
}