1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-07-05 01:42:43 +00:00

Fix Free Fall crashing in horodisk land structure

It still doesn't work completely right (in particular, you'll get the
"warning: a looped line" message, and gravity will point the wrong way on
some of the outermost tiles), but this is way better than the whole game
crashing whenever you get near the land at all.
This commit is contained in:
Joseph C. Sible
2025-11-17 00:00:22 -05:00
parent 00859f037a
commit c0092bd546
+1 -1
View File
@@ -224,7 +224,7 @@ EX namespace westwall {
void build(vector<cell*>& whirlline, int d) {
again:
cell *at = whirlline[isize(whirlline)-1];
cell *prev = whirlline[isize(whirlline)-2];
cell *prev = isize(whirlline) >= 2 ? whirlline[isize(whirlline)-2] : NULL;
if(looped(whirlline)) return;
for(int i=0; i<at->type; i++)
if(at->move(i) && coastvalEdge1(at->move(i)) == d && at->move(i) != prev) {