From 61bb9282882252da9a2485aaccddc935dee1aced Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 13 Oct 2009 05:50:42 -0700 Subject: In arena mode, scale zapping and explosion animation delays to match change in arena_delay from the default. --- crawl-ref/source/beam.cc | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 39d700aa8c..e2815833cc 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -164,7 +164,16 @@ static void _zap_animation(int colour, const monsters *mon = NULL, #endif update_screen(); - delay(50); + + int zap_delay = 50; + // Scale delay to match change in arena_delay. + if (crawl_state.arena) + { + zap_delay *= Options.arena_delay; + zap_delay /= 600; + } + + delay(zap_delay); } } @@ -5552,7 +5561,16 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle) explosion_draw_cell(delta + pos()); } update_screen(); - delay(50); + + int explode_delay = 50; + // Scale delay to match change in arena_delay. + if (crawl_state.arena) + { + explode_delay *= Options.arena_delay; + explode_delay /= 600; + } + + delay(explode_delay); } } @@ -5584,7 +5602,17 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle) // Delay after entire explosion has been drawn. if (!is_tracer && cells_seen > 0 && show_more) - delay(150); + { + int explode_delay = 150; + // Scale delay to match change in arena_delay. + if (crawl_state.arena) + { + explode_delay *= Options.arena_delay; + explode_delay /= 600; + } + + delay(explode_delay); + } return (cells_seen > 0); } -- cgit v1.2.3-54-g00ecf