1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-03 13:28:04 +00:00

rogueviz:: ads:: fixed a freeze when moving too fast -- although ads is still useless then

This commit is contained in:
Zeno Rogue
2025-09-07 12:49:56 +02:00
parent 0760b10454
commit 2526b5e95a
3 changed files with 4 additions and 0 deletions

View File

@@ -342,6 +342,8 @@ auto shot_hooks =
-> editable(0, 100, 1, "tiles to generate per frame", "reduce if the framerate is low", 'G');
param_i(draw_per_frame, "ads_draw_per_frame")
-> editable(0, 3000, 0.1, "tiles to draw per frame", "reduce if the framerate is low", 'D');
param_i(draw_per_frame, "ads_draw_per_frame_equal")
-> editable(0, 3000, 0.1, "tiles to draw per frame -- extra tiles to draw when distances are equal", "reduce if the framerate is low", 'D');
param_f(time_scale, "rh_time_scale")
-> editable(0, 1, 0.1, "Relative Hell time label scale", "scaling factor for the time labels", 'T');

View File

@@ -364,6 +364,7 @@ void view_ads_game() {
i++;
auto& cd = dq.top();
if(i > draw_per_frame && cd.d > lastd + 1e-4) break;
if(i > draw_per_frame + draw_per_frame_equal) break;
lastd = cd.d;
cds[cd.c] = cd;
draw_game_cell(cd);

View File

@@ -114,6 +114,7 @@ cell *starting_point;
int max_gen_per_frame = 3;
int draw_per_frame = 200;
int draw_per_frame_equal = 200;
bool simple_ship = false;