diff --git a/src/d_netcmd.c b/src/d_netcmd.c index cd6189e8a..2556ab0ac 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -768,15 +768,21 @@ void D_RegisterClientCommands(void) for (i = 0; i < MAXSKINCOLORS; i++) { - Color_cons_t[i].value = Followercolor_cons_t[i].value = i; - Color_cons_t[i].strvalue = Followercolor_cons_t[i].strvalue = skincolors[i].name; + Color_cons_t[i].value = i; + Color_cons_t[i].strvalue = skincolors[i].name; } - Followercolor_cons_t[MAXSKINCOLORS].value = MAXSKINCOLORS; - Followercolor_cons_t[MAXSKINCOLORS].strvalue = "Match"; // Add "Match" option, which will make the follower color match the player's + for (i = 2; i < MAXSKINCOLORS; i++) + { + Followercolor_cons_t[i].value = i-2; + Followercolor_cons_t[i].strvalue = skincolors[i-2].name; + } - Followercolor_cons_t[MAXSKINCOLORS+1].value = MAXSKINCOLORS+1; - Followercolor_cons_t[MAXSKINCOLORS+1].strvalue = "Opposite"; // Add "Opposite" option, ...which is like "Match", but for coloropposite. + Followercolor_cons_t[1].value = -1; + Followercolor_cons_t[1].strvalue = "Match"; // Add "Match" option, which will make the follower color match the player's + + Followercolor_cons_t[0].value = -2; + Followercolor_cons_t[0].strvalue = "Opposite"; // Add "Opposite" option, ...which is like "Match", but for coloropposite. Color_cons_t[MAXSKINCOLORS].value = Followercolor_cons_t[MAXSKINCOLORS+2].value = 0; Color_cons_t[MAXSKINCOLORS].strvalue = Followercolor_cons_t[MAXSKINCOLORS+2].strvalue = NULL; diff --git a/src/p_user.c b/src/p_user.c index a8523bdf6..bbc28a504 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3804,7 +3804,7 @@ static void P_HandleFollower(player_t *player) angle_t an; fixed_t zoffs; fixed_t sx, sy, sz; - UINT16 color; + INT16 color; fixed_t bubble; // bubble scale (0 if no bubble) mobj_t *bmobj; // temp bubble mobj @@ -3851,19 +3851,18 @@ static void P_HandleFollower(player_t *player) } // Set follower colour - switch (player->followercolor) { - case MAXSKINCOLORS: // "Match" + case 255: // "Match" (-1) color = player->skincolor; break; - case MAXSKINCOLORS+1: // "Opposite" + case 254: // "Opposite" (-2) color = skincolors[player->skincolor].invcolor; break; default: color = player->followercolor; - if (!color || color > MAXSKINCOLORS+2) // Make sure this isn't garbage + if (color < -2 || !color || color > MAXSKINCOLORS+2) // Make sure this isn't garbage color = player->skincolor; // "Match" as fallback. break;