change gamepad rgb color when switching viewpoints
This commit is contained in:
1 parent
82ad38e7f4
commit
9839d7ca3a
3 files changed
+14
-1
No files matched your search
@@ -6085,6 +6085,8 @@ static void Color_OnChange(void)
|
||||
CV_StealthSetValue(&cv_playercolor,
|
||||
players[consoleplayer].skincolor);
|
||||
}
|
||||
|
||||
G_SetPlayerGamepadIndicatorToPlayerColor(0); // update again
|
||||
}
|
||||
|
||||
/** Sends a color change for the secondary splitscreen player, unless that
|
||||
|
||||
@@ -2152,6 +2152,8 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
|
||||
|
||||
if (viewnum == 1 && demo.playback)
|
||||
consoleplayer = displayplayers[0];
|
||||
|
||||
G_SetPlayerGamepadIndicatorToPlayerColor(0);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -8480,6 +8482,9 @@ boolean G_DemoTitleResponder(event_t *ev)
|
||||
void G_SetGamestate(gamestate_t newstate)
|
||||
{
|
||||
gamestate = newstate;
|
||||
|
||||
G_SetPlayerGamepadIndicatorToPlayerColor(0); // dumb hack but works
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
DRPC_UpdatePresence();
|
||||
#endif
|
||||
|
||||
+7
-1
@@ -823,6 +823,12 @@ static const char *gamecontrolname[num_gamecontrols] =
|
||||
#define NUMKEYNAMES (sizeof (keynames)/sizeof (keyname_t))
|
||||
|
||||
#include "k_kart.h"
|
||||
|
||||
static UINT16 G_GetSkinColor(void)
|
||||
{
|
||||
return ((gamestate == GS_LEVEL) ? players[displayplayers[0]].skincolor : cv_playercolor.value);
|
||||
}
|
||||
|
||||
// ehhhhhh ill maybe add splitscreen support eventually lol
|
||||
void G_SetPlayerGamepadIndicatorToPlayerColor(UINT16 color)
|
||||
{
|
||||
@@ -832,7 +838,7 @@ void G_SetPlayerGamepadIndicatorToPlayerColor(UINT16 color)
|
||||
if (color)
|
||||
skincolor = color;
|
||||
else
|
||||
skincolor = cv_playercolor.value;
|
||||
skincolor = G_GetSkinColor();
|
||||
|
||||
byte_color = V_GetColor(colortranslations[skincolor][8]).s;
|
||||
|
||||
|
||||
Reference in new issue
Block a user