Skip to content

Commit

Permalink
Reset Automap button states when enabling Minimap
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed Nov 21, 2023
1 parent 57f9f91 commit c26d01a
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

extern int need_downscaling; // [Nugget]

// [Nugget] Tag Finder from PrBoomX /------------
// [Nugget] Tag Finder from PrBoomX /-----------------------------------------

static boolean findtag;

Expand All @@ -54,7 +54,7 @@ static int magic_line_color_pos = MAGIC_LINE_COLOR_MIN;
static sector_t* magic_sector;
static short magic_tag = -1;

// [Nugget] Tag Finder from PrBoomX ------------/
// [Nugget] Tag Finder from PrBoomX -----------------------------------------/

//jff 1/7/98 default automap colors added
int mapcolor_back; // map background
Expand Down Expand Up @@ -755,17 +755,6 @@ void AM_Start()
HU_NughudAlignTime(); // [Nugget] NUGHUD
}

// [Nugget]
void AM_ChangeMode(automapmode_t mode)
{
automapactive = mode;

if (!automapactive)
AM_Stop();
else
AM_Start();
}

//
// AM_minOutWindowScale()
//
Expand Down Expand Up @@ -807,6 +796,20 @@ enum

static int buttons_state[STATE_NUM] = { 0 };

// [Nugget]
void AM_ChangeMode(automapmode_t mode)
{
automapactive = mode;

if (automapactive == AM_MINI)
{ memset(buttons_state, 0, sizeof(buttons_state)); }

if (!automapactive)
AM_Stop();
else
AM_Start();
}

//
// AM_Responder()
//
Expand Down

0 comments on commit c26d01a

Please sign in to comment.