1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-02 02:37:55 +00:00

last_bowpath changed to more efficient bowpath_map

This commit is contained in:
Zeno Rogue
2023-10-28 08:33:18 +02:00
parent c36da1985c
commit 4f82c3eb8e
3 changed files with 73 additions and 57 deletions

View File

@@ -325,8 +325,8 @@ bool pcmove::movepcto() {
fmsActivate = forcedmovetype == fmSkip || forcedmovetype == fmActivate;
changes.init(checkonly);
changes.value_keep(bow::last_bowpath);
bow::last_bowpath.clear();
changes.value_keep(bow::bowpath_map);
bow::bowpath_map.clear();
bool b = (d >= 0) ? actual_move() : stay();
if(checkonly || !b) {
changes.rollback();
@@ -334,7 +334,7 @@ bool pcmove::movepcto() {
if(!b && items[itCrossbow] == 0 && bow::crossbow_mode() && !bow::fire_mode && d >= 0) {
changes.init(checkonly);
changes.value_keep(bow::last_bowpath);
changes.value_keep(bow::bowpath_map);
b = try_shooting(true);
if(checkonly || !b) changes.rollback();
}