@@ -1573,7 +1573,7 @@ class Game {
1573
1573
bool shift_pressed);
1574
1574
void toggleFog (float *statustext_time, bool *flag);
1575
1575
void toggleDebug (float *statustext_time, bool *show_debug,
1576
- bool *show_profiler_graph);
1576
+ bool *show_profiler_graph, bool *show_wireframe );
1577
1577
void toggleUpdateCamera (float *statustext_time, bool *flag);
1578
1578
void toggleProfiler (float *statustext_time, u32 *profiler_current_page,
1579
1579
u32 profiler_max_page);
@@ -2812,7 +2812,8 @@ void Game::processKeyInput(VolatileRunFlags *flags,
2812
2812
} else if (wasKeyDown (KeyType::TOGGLE_UPDATE_CAMERA)) {
2813
2813
toggleUpdateCamera (statustext_time, &flags->disable_camera_update );
2814
2814
} else if (wasKeyDown (KeyType::TOGGLE_DEBUG)) {
2815
- toggleDebug (statustext_time, &flags->show_debug , &flags->show_profiler_graph );
2815
+ toggleDebug (statustext_time, &flags->show_debug , &flags->show_profiler_graph ,
2816
+ &draw_control->show_wireframe );
2816
2817
} else if (wasKeyDown (KeyType::TOGGLE_PROFILER)) {
2817
2818
toggleProfiler (statustext_time, profiler_current_page, profiler_max_page);
2818
2819
} else if (wasKeyDown (KeyType::INCREASE_VIEWING_RANGE)) {
@@ -3119,22 +3120,33 @@ void Game::toggleFog(float *statustext_time, bool *flag)
3119
3120
3120
3121
3121
3122
void Game::toggleDebug (float *statustext_time, bool *show_debug,
3122
- bool *show_profiler_graph)
3123
+ bool *show_profiler_graph, bool *show_wireframe )
3123
3124
{
3124
- // Initial / 3x toggle: Chat only
3125
+ // Initial / 4x toggle: Chat only
3125
3126
// 1x toggle: Debug text with chat
3126
3127
// 2x toggle: Debug text with profiler graph
3128
+ // 3x toggle: Debug text and wireframe
3127
3129
if (!*show_debug) {
3128
3130
*show_debug = true ;
3129
3131
*show_profiler_graph = false ;
3132
+ *show_wireframe = false ;
3130
3133
statustext = L" Debug info shown" ;
3131
- } else if (*show_profiler_graph) {
3132
- *show_debug = false ;
3133
- *show_profiler_graph = false ;
3134
- statustext = L" Debug info and profiler graph hidden" ;
3135
- } else {
3134
+ } else if (!*show_profiler_graph) {
3136
3135
*show_profiler_graph = true ;
3137
3136
statustext = L" Profiler graph shown" ;
3137
+ } else if (!*show_wireframe && client->checkPrivilege (" debug" )) {
3138
+ *show_profiler_graph = false ;
3139
+ *show_wireframe = true ;
3140
+ statustext = L" Wireframe shown" ;
3141
+ } else {
3142
+ *show_debug = false ;
3143
+ *show_profiler_graph = false ;
3144
+ *show_wireframe = false ;
3145
+ if (client->checkPrivilege (" debug" )) {
3146
+ statustext = L" Debug info, profiler graph, and wireframe hidden" ;
3147
+ } else {
3148
+ statustext = L" Debug info and profiler graph hidden" ;
3149
+ }
3138
3150
}
3139
3151
*statustext_time = 0 ;
3140
3152
}
0 commit comments