1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-01 03:39:16 +00:00

fixup to smart shortcuts

This commit is contained in:
Zeno Rogue 2021-12-24 23:13:57 +01:00
parent f861126171
commit 5115a379ee

View File

@ -702,7 +702,7 @@ EX void look_for_shortcuts(tcell *c, shortcut& sh) {
for(auto& v: sh.pre) { for(auto& v: sh.pre) {
opath.push_back(tw.at); opath.push_back(tw.at);
tw += v; tw += v;
if(!tw.peek() && (flags & w_less_smart_retrace)) return; if(!tw.peek() && !(flags & w_less_smart_retrace)) return;
ufind(tw); ufind(tw);
tw += wstep; tw += wstep;
calc_distances(tw.at); calc_distances(tw.at);
@ -714,7 +714,7 @@ EX void look_for_shortcuts(tcell *c, shortcut& sh) {
for(auto it = sh.post.rbegin(); it != sh.post.rend(); it++) { for(auto it = sh.post.rbegin(); it != sh.post.rend(); it++) {
auto& v = *it; auto& v = *it;
if(tw.at->dist >= expected_dist && !tw.peek() && (flags & w_less_smart_advance)) return; if(tw.at->dist >= expected_dist && !tw.peek() && !(flags & w_less_smart_advance)) return;
ufind(tw); ufind(tw);
tw += wstep; tw += wstep;
calc_distances(tw.at); calc_distances(tw.at);