1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +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) {
opath.push_back(tw.at);
tw += v;
if(!tw.peek() && (flags & w_less_smart_retrace)) return;
if(!tw.peek() && !(flags & w_less_smart_retrace)) return;
ufind(tw);
tw += wstep;
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++) {
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);
tw += wstep;
calc_distances(tw.at);