Merge branch 'next' into hitconfirm
This commit is contained in:
commit
04924745ef
4 changed files with 48 additions and 3 deletions
15
src/k_hud.c
15
src/k_hud.c
|
|
@ -2707,6 +2707,13 @@ static void K_drawKartStatsnLives(void)
|
|||
UINT8 *colormapstat = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_BLUE, GTC_CACHE);
|
||||
UINT8 *colormapstat2 = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_ORANGE, GTC_CACHE);
|
||||
|
||||
if (stplyr->kartspeed != skins[stplyr->skin].kartspeed
|
||||
|| stplyr->kartweight != skins[stplyr->skin].kartweight)
|
||||
{
|
||||
colormapstat = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE);
|
||||
colormapstat2 = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MUSTARD, GTC_CACHE);
|
||||
}
|
||||
|
||||
V_DrawFixedPatch((fx+56+offsetx+facerank->leftoffset)<< FRACBITS, (fy-19+offsety+facerank->topoffset)<< FRACBITS, FRACUNIT, V_HUDTRANS|splitflags, kp_facenum[(stplyr->kartspeed % 10)], colormapstat);
|
||||
V_DrawFixedPatch((fx+69+offsetx+facerank->leftoffset)<< FRACBITS, (fy-4+offsety+facerank->topoffset)<< FRACBITS, FRACUNIT, V_HUDTRANS|splitflags, kp_facenum[(stplyr->kartweight % 10)], colormapstat2);
|
||||
}
|
||||
|
|
@ -3451,6 +3458,14 @@ static void K_DrawNameTagForPlayer(fixed_t x, fixed_t y, player_t *p)
|
|||
|
||||
// Draw the name itself
|
||||
V_DrawThinStringAtFixed(x + (5*FRACUNIT), y - (26*FRACUNIT), vflags|V_6WIDTHSPACE|V_ALLOWLOWERCASE|clr, player_names[p - players]);
|
||||
|
||||
// Also draw stats of restated players.
|
||||
if (p->kartspeed != skins[p->skin].kartspeed
|
||||
|| p->kartweight != skins[p->skin].kartweight)
|
||||
{
|
||||
V_DrawSmallStringAtFixed(x + (5*FRACUNIT), y - (31*FRACUNIT), vflags, va("\x84S%d ", p->kartspeed));
|
||||
V_DrawSmallStringAtFixed(x + (15*FRACUNIT), y - (31*FRACUNIT), vflags, va("\x87W%d ", p->kartweight));
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct weakspotdraw_t
|
||||
|
|
|
|||
|
|
@ -616,8 +616,16 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
|
||||
player->followitem = skin->followitem;
|
||||
|
||||
player->kartspeed = skin->kartspeed;
|
||||
player->kartweight = skin->kartweight;
|
||||
if (player->kartspeedrestat != 0 || player->kartweightrestat != 0)
|
||||
{
|
||||
player->kartspeed = player->kartspeedrestat;
|
||||
player->kartweight = player->kartweightrestat;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->kartspeed = skin->kartspeed;
|
||||
player->kartweight = skin->kartweight;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (!(cht_debug || devparm) && !(netgame || multiplayer || demo.playback))
|
||||
|
|
|
|||
|
|
@ -3874,9 +3874,29 @@ fixed_t R_GetThingFade(mobj_t *thing)
|
|||
{
|
||||
fixed_t fadealpha = FRACUNIT;
|
||||
|
||||
if (!cv_playerfade.value || leveltime < starttime-(3*TICRATE) || !thing->player || thing->player == viewplayer)
|
||||
if (!cv_playerfade.value || leveltime < starttime-(3*TICRATE))
|
||||
return fadealpha;
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
if (!thing->player || thing->player == viewplayer)
|
||||
return fadealpha;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (thing->type)
|
||||
{
|
||||
case MT_FOLLOWER:
|
||||
case MT_FOLLOWERBUBBLE_BACK:
|
||||
case MT_FOLLOWERBUBBLE_FRONT:
|
||||
break;
|
||||
|
||||
default:
|
||||
return fadealpha;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const INT32 playerdist = (FixedMul((thing->x - viewx), viewcos) + FixedMul((thing->y - viewy), viewsin)) >> FRACBITS;
|
||||
const INT32 viewplayerdist = (FixedMul((viewplayer->mo->x - viewx), viewcos) + FixedMul((viewplayer->mo->y - viewy), viewsin)) >> FRACBITS;
|
||||
|
||||
|
|
|
|||
|
|
@ -331,6 +331,8 @@ void V_DrawRightAlignedString(INT32 x, INT32 y, INT32 option, const char *string
|
|||
// draw a string using the hu_font, 0.5x scale
|
||||
#define V_DrawSmallString( x,y,option,string ) \
|
||||
V__DrawDupxString (x,y,FRACUNIT>>1,option,HU_FONT,string)
|
||||
#define V_DrawSmallStringAtFixed( x,y,option,string ) \
|
||||
V__DrawOneScaleString (x,y,FRACUNIT>>1,option,HU_FONT,string)
|
||||
void V_DrawCenteredSmallString(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
void V_DrawCenteredSmallStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string);
|
||||
void V_DrawRightAlignedSmallString(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
|
|
|
|||
Loading…
Reference in a new issue