Skip to content

Commit

Permalink
Zoom to custom traps/doors fixed (#3336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loobinex committed Jun 30, 2024
1 parent 8f69d4d commit 1858cd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/frontmenu_ingame_tabs.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,12 +751,12 @@ void gui_choose_trap(struct GuiButton *gbtn)
void go_to_next_trap_of_type(ThingModel tngmodel, PlayerNumber plyr_idx)
{
struct Thing *thing;
if (tngmodel >= 8) {
if (tngmodel >= TRAPDOOR_TYPES_MAX) {
ERRORLOG("Bad trap kind");
return;
}
unsigned long k = 0;
static unsigned short seltrap[8];
static ThingModel seltrap[TRAPDOOR_TYPES_MAX];
int i = seltrap[tngmodel];
SYNCDBG(9,"Starting, prev index %d",i);
{
Expand Down Expand Up @@ -807,12 +807,12 @@ void go_to_next_trap_of_type(ThingModel tngmodel, PlayerNumber plyr_idx)
void go_to_next_door_of_type(ThingModel tngmodel, PlayerNumber plyr_idx)
{
struct Thing *thing;
if (tngmodel >= 8) {
if (tngmodel >= TRAPDOOR_TYPES_MAX) {
ERRORLOG("Bad door kind");
return;
}
unsigned long k = 0;
static unsigned short seldoor[8];
static ThingModel seldoor[TRAPDOOR_TYPES_MAX];
int i = seldoor[tngmodel];
{
if (i != 0) {
Expand Down

0 comments on commit 1858cd4

Please sign in to comment.