Skip to content

Commit

Permalink
ESC mp menu don't save colors
Browse files Browse the repository at this point in the history
  • Loading branch information
timbergeron committed Oct 11, 2023
1 parent 33e675d commit 3f49731
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ static void hsvtorgb(float inh, float s, float v, byte *out)
};

qboolean rgbactive; // woods
qboolean colordelta; // woods

void M_AdjustColour(plcolour_t *tr, int dir)
{
Expand Down Expand Up @@ -896,7 +897,7 @@ void M_Setup_Draw (void)
flyme = false;
}

if (!chase_active.value && !cls.demoplayback && host_initialized && !flyme) // woods #3rdperson
if (!chase_active.value && !cls.demoplayback && host_initialized && !flyme && cls.state == ca_connected) // woods #3rdperson
{
chasewasnotactive = true;
Cbuf_AddText("chase_active 1\n");
Expand Down Expand Up @@ -961,6 +962,11 @@ void M_Setup_Key (int k)
chasewasnotactive = false;
Cbuf_AddText("chase_active 0\n");
}
if (colordelta)
{
colordelta = false;
Cbuf_AddText(va("color %s %s\n", CL_PLColours_ToString(setup_oldtop), CL_PLColours_ToString(setup_oldbottom)));
}
case K_BBUTTON:
M_Menu_MultiPlayer_f ();
break;
Expand All @@ -987,18 +993,22 @@ void M_Setup_Key (int k)
if (setup_cursor == 3) // 2 to 3 woods #namemaker
{
M_AdjustColour(&setup_top, -1);
strncpy (lastColorSelected, CL_PLColours_ToString (setup_top), sizeof ((CL_PLColours_ToString (setup_top))));
if (chase_active.value && !cls.demoplayback && host_initialized && !flyme) // woods #3rdperson
if (!CL_PLColours_Equals(setup_top, setup_oldtop) || !CL_PLColours_Equals(setup_bottom, setup_oldbottom))
{
Cbuf_AddText(va("color %s %s\n", CL_PLColours_ToString(setup_top), CL_PLColours_ToString(setup_bottom)));
colordelta = true;
}
}
if (setup_cursor == 4) // 3 to 4 woods #namemaker
{
M_AdjustColour(&setup_bottom, -1);
strncpy (lastColorSelected, CL_PLColours_ToString (setup_bottom), sizeof ((CL_PLColours_ToString (setup_bottom))));
if (chase_active.value && !cls.demoplayback && host_initialized && !flyme) // woods #3rdperson
if (!CL_PLColours_Equals(setup_top, setup_oldtop) || !CL_PLColours_Equals(setup_bottom, setup_oldbottom))
{
Cbuf_AddText(va("color %s %s\n", CL_PLColours_ToString(setup_top), CL_PLColours_ToString(setup_bottom)));
colordelta = true;
}
}
break;
case K_MWHEELUP:
Expand All @@ -1013,15 +1023,21 @@ void M_Setup_Key (int k)
strncpy (lastColorSelected, CL_PLColours_ToString (setup_top), sizeof ((CL_PLColours_ToString (setup_top))));
if (chase_active.value && !cls.demoplayback && host_initialized && !flyme) // woods #3rdperson
if (!CL_PLColours_Equals(setup_top, setup_oldtop) || !CL_PLColours_Equals(setup_bottom, setup_oldbottom))
{
Cbuf_AddText(va("color %s %s\n", CL_PLColours_ToString(setup_top), CL_PLColours_ToString(setup_bottom)));
colordelta = true;
}
}
if (setup_cursor == 4) // 3 to 4 woods #namemaker
{
M_AdjustColour(&setup_bottom, +1);
strncpy (lastColorSelected, CL_PLColours_ToString (setup_bottom), sizeof ((CL_PLColours_ToString (setup_bottom))));
if (chase_active.value && !cls.demoplayback && host_initialized && !flyme) // woods #3rdperson
if (!CL_PLColours_Equals(setup_top, setup_oldtop) || !CL_PLColours_Equals(setup_bottom, setup_oldbottom))
{
Cbuf_AddText(va("color %s %s\n", CL_PLColours_ToString(setup_top), CL_PLColours_ToString(setup_bottom)));
colordelta = true;
}
}
break;

Expand Down

0 comments on commit 3f49731

Please sign in to comment.