Skip to content

Commit

Permalink
[#9] Space killfeed off from the sides of the screen and change defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
taysta committed Oct 5, 2023
1 parent 624d360 commit 645f9db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions codemp/cgame/cg_xcvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ XCVAR_DEF( cg_killfeed, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedX, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedY, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedAlignment, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedIconSize, "24", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedTextSize, "2", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedIconSize, "12", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedTextSize, "0.8", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_killfeedColors, "0", NULL, CVAR_ARCHIVE )


Expand Down
10 changes: 5 additions & 5 deletions codemp/cgame/hud_obituary.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void HUD_DrawObituary(void) {
else
textScale = OBITUARY_TEXT_SIZE;

y = kfYOffset;
y = 10.0f + kfYOffset;
padding = OBITUARY_PADDING_SCALAR;
iconWidth = (iconSize * cgs.widthRatioCoef);
iconHeight = iconSize;
Expand Down Expand Up @@ -182,10 +182,10 @@ void HUD_DrawObituary(void) {
//offset the allignment
switch (killfeedAlignment){
case KF_RIGHT:
x = SCREEN_WIDTH - totalWidth + kfXOffset;
x = SCREEN_WIDTH - totalWidth - (10.0f + kfXOffset) * cgs.widthRatioCoef;
break;
case KF_LEFT:
x = 0.0f + kfXOffset;
x = (10.0f + kfXOffset) * cgs.widthRatioCoef;
break;
case KF_CENTER:
x = (SCREEN_WIDTH - totalWidth) * 0.5f + kfXOffset;
Expand All @@ -202,12 +202,12 @@ void HUD_DrawObituary(void) {
}
trap->R_SetColor(wepColor);
CG_DrawPic(x + boxCenterX - 0.5f * iconWidth, boxCenterY - 0.5f * iconHeight, iconWidth, iconHeight, deathIcon);
x += (boxCenterX * 2.0f);
trap->R_SetColor(NULL);
x += (boxCenterX * 2.0f);
CG_FillRect(x, y, victimTextWidth + xPadding, maxHeight + yPadding, victimColor);
CG_Text_Paint(x + (0.5f * xPadding), victimTextStartY, textScale, color, cgs.clientinfo[p->victim].name, 0, 0, 0, FONT_MEDIUM);

y += (2.0f * boxCenterY) + yPadding;
y += boxCenterY + yPadding;
}
}

Expand Down

0 comments on commit 645f9db

Please sign in to comment.