MCPcopy Create free account
hub / github.com/crawl/crawl / process_command

Method process_command

crawl-ref/source/viewmap.cc:761–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759 }
760
761 void process_command(command_type cmd)
762 {
763 auto ret = process_map_command(cmd, m_state);
764 // reentry happens if during the process, something else called in to
765 // set_lpos. E.g. this can happen via a describe popup. If this
766 // happened, then it set m_state and we don't want to overwrite it.
767 // TODO some refactoring to make this cleaner
768 if (!check_and_reset_reentry())
769 m_state = std::move(ret);
770
771 if (!m_state.map_alive)
772 return;
773
774 if (m_state.lpos.id != level_id::current())
775 goto_level();
776
777 m_state.lpos.pos = m_state.lpos.pos.clamped(known_map_bounds());
778 }
779
780 void set_lpos(level_pos dest)
781 {

Callers 1

process_map_commandFunction · 0.45

Calls 3

process_map_commandFunction · 0.85
known_map_boundsFunction · 0.85
clampedMethod · 0.80

Tested by

no test coverage detected