summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-damage.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-02-27 11:26:06 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2014-02-27 11:28:02 -0700
commitbc91c1a70fa22b8bed8363131c1eacf5f928ffcc (patch)
tree0e01ff06be8aa541f8cbb1b3ff3ee9f47864c305 /crawl-ref/source/spl-damage.cc
parente3a43be560f5bfd2d774c6c5a29ab64a1ddef3c0 (diff)
downloadcrawl-ref-bc91c1a70fa22b8bed8363131c1eacf5f928ffcc.tar.gz
crawl-ref-bc91c1a70fa22b8bed8363131c1eacf5f928ffcc.zip
Make arena_delay available outside of arena as view_delay.
So, if you're running a bot or you're generally annoyed by ranged/magical animations, you can set this to an appropriately low value. This also condenses a lot of code duplication related to arena_delay; a new function called scaled_delay is used for functions that should be impacted by this.
Diffstat (limited to 'crawl-ref/source/spl-damage.cc')
-rw-r--r--crawl-ref/source/spl-damage.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc
index d2f922935c..068c87c398 100644
--- a/crawl-ref/source/spl-damage.cc
+++ b/crawl-ref/source/spl-damage.cc
@@ -2446,13 +2446,7 @@ spret_type cast_thunderbolt(actor *caster, int pow, coord_def aim, bool fail)
beam.draw(p->first);
}
- int flash_delay = 200;
- if (crawl_state.game_is_arena())
- {
- flash_delay *= Options.arena_delay;
- flash_delay /= 600;
- }
- delay(flash_delay);
+ scaled_delay(200);
beam.glyph = 0; // FIXME: a hack to avoid "appears out of thin air"
@@ -2991,13 +2985,6 @@ spret_type cast_glaciate(actor *caster, int pow, coord_def aim, bool fail)
#endif
beam.draw_delay = 0;
- int zap_delay = 25;
- if (crawl_state.game_is_arena())
- {
- zap_delay *= Options.arena_delay;
- zap_delay /= 600;
- }
-
for (int i = 1; i <= range; i++)
{
for (map<coord_def, aff_type>::const_iterator p =
@@ -3009,11 +2996,10 @@ spret_type cast_glaciate(actor *caster, int pow, coord_def aim, bool fail)
beam.draw(p->first);
}
- delay(zap_delay);
+ scaled_delay(25);
}
- zap_delay *= 3;
- delay(zap_delay);
+ scaled_delay(100);
if (you.can_see(caster) || caster->is_player())
{