1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-18 23:10:26 +00:00

walking:: switch_walking function

This commit is contained in:
Zeno Rogue 2022-06-10 18:45:28 +02:00
parent 91b6628922
commit 066b683bde

View File

@ -1014,16 +1014,18 @@ EX void handle() {
ticks_last = ticks; ticks_last = ticks;
} }
EX void add_options() { EX void switch_walking() {
dialog::addBoolItem("walking mode", on, 'w');
dialog::add_action([] {
on = !on; on = !on;
if(on && auto_eyelevel) eye_level = -1; if(on && auto_eyelevel) eye_level = -1;
floor_dir = -1; floor_dir = -1;
on_floor_of = nullptr; on_floor_of = nullptr;
ticks_last = ticks; ticks_last = ticks;
ticks_end = ticks + 1000; ticks_end = ticks + 1000;
}); }
EX void add_options() {
dialog::addBoolItem("walking mode", on, 'w');
dialog::add_action(switch_walking);
add_edit(eye_level); add_edit(eye_level);
add_edit(eye_angle); add_edit(eye_angle);
if(point_direction >= 0 && point_direction < centerover->type) { if(point_direction >= 0 && point_direction < centerover->type) {