Skip to content

Commit

Permalink
Improve altsprite pickup code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlaux committed Oct 13, 2024
1 parent cb0baca commit bbbacad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
};

pickupmsg(player, "%s", s);
goto picked_up;
}
else if (special->altsprite == ASPR_NGCL)
{
Expand All @@ -372,12 +373,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
};

pickupmsg(player, "%s", s);
goto picked_up;
}
else
// Match the below switch's default
return;
}
else

// Identify by sprite.
switch (special->sprite)
Expand Down Expand Up @@ -714,6 +712,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
return; // killough 12/98: suppress error message
}

picked_up: // [Nugget]

if (special->flags & MF_COUNTITEM)
{
player->itemcount++;
Expand Down

0 comments on commit bbbacad

Please sign in to comment.