Skip to content

Commit

Permalink
Fix "view bob" option display
Browse files Browse the repository at this point in the history
When enabled, cl_bob is 0.02, which was converted implicitly to 0 since M_DrawCheckbox expected an int argument. This caused the option to always be shown as off.
  • Loading branch information
andrei-drexler committed Sep 7, 2024
1 parent e9fafaf commit cb8b314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3992,9 +3992,9 @@ void M_DrawThresholdSlider (int x, int y, float range, qboolean enabled, float l
M_DrawSliderWithMarkers (x, y, range, &marker, enabled ? 1 : 0, desc);
}

void M_DrawCheckbox (int x, int y, int on)
void M_DrawCheckbox (int x, int y, float value)
{
M_Print (x, y, on ? "On" : "Off");
M_Print (x, y, value ? "On" : "Off");
}

qboolean M_SetSliderValue (int option, float f)
Expand Down
2 changes: 1 addition & 1 deletion Quake/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void M_DrawCharacter (int cx, int line, int num);
void M_DrawPic (int x, int y, qpic_t *pic);
void M_DrawSubpic (int x, int y, qpic_t *pic, int left, int top, int width, int height);
void M_DrawTransPic (int x, int y, qpic_t *pic);
void M_DrawCheckbox (int x, int y, int on);
void M_DrawCheckbox (int x, int y, float value);
void M_DrawTextBox (int x, int y, int width, int lines);

#endif /* _QUAKE_MENU_H */
Expand Down

0 comments on commit cb8b314

Please sign in to comment.