1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +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 switch_walking() {
on = !on;
if(on && auto_eyelevel) eye_level = -1;
floor_dir = -1;
on_floor_of = nullptr;
ticks_last = ticks;
ticks_end = ticks + 1000;
}
EX void add_options() { EX void add_options() {
dialog::addBoolItem("walking mode", on, 'w'); dialog::addBoolItem("walking mode", on, 'w');
dialog::add_action([] { dialog::add_action(switch_walking);
on = !on;
if(on && auto_eyelevel) eye_level = -1;
floor_dir = -1;
on_floor_of = nullptr;
ticks_last = ticks;
ticks_end = ticks + 1000;
});
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) {