diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-03 18:31:53 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-03 18:31:53 +0100 |
commit | c2ab8031a5bfb9347a5f59679d53fc559ab5402e (patch) | |
tree | 60c2427ebf9b234195f9dd75a07c97a52bd0ac2b /crawl-ref/source/l_debug.cc | |
parent | 25d67b3e769164a2a2821c103d4df9204f1f51de (diff) | |
download | crawl-ref-c2ab8031a5bfb9347a5f59679d53fc559ab5402e.tar.gz crawl-ref-c2ab8031a5bfb9347a5f59679d53fc559ab5402e.zip |
Add option to use find_ray to debug_bouncy_beam.
Diffstat (limited to 'crawl-ref/source/l_debug.cc')
-rw-r--r-- | crawl-ref/source/l_debug.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/l_debug.cc b/crawl-ref/source/l_debug.cc index 91ff1080b6..d8cb466bae 100644 --- a/crawl-ref/source/l_debug.cc +++ b/crawl-ref/source/l_debug.cc @@ -80,10 +80,14 @@ LUAFN(debug_bouncy_beam) source.y = luaL_checkint(ls, 2); target.x = luaL_checkint(ls, 3); target.y = luaL_checkint(ls, 4); + int range = luaL_checkint(ls, 5); + bool findray = false; + if (lua_gettop(ls) > 5) + findray = lua_toboolean(ls, 6); bolt beam; - beam.range = luaL_checkint(ls, 5); + beam.range = range; beam.type = '*'; beam.colour = LIGHTCYAN; beam.flavour = BEAM_ELECTRICITY; @@ -92,6 +96,9 @@ LUAFN(debug_bouncy_beam) beam.is_beam = true; beam.draw_delay = 0; + if (findray) + beam.chose_ray = find_ray(source, target, beam.ray); + beam.name = "debug lightning beam"; beam.short_name = "DEBUG"; |