1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

ray:: fixed raycaster in 2dim geometries crashing

This commit is contained in:
Zeno Rogue 2021-11-07 10:19:21 +01:00
parent 456adb32c0
commit d07ae075bc

View File

@ -1417,7 +1417,7 @@ EX namespace hybrid {
for(auto& v: cgi.walloffsets) if(v.first >= 0) result.push_back(v);
sort(result.begin(), result.end());
// not a correct fix
result.emplace_back(result.back().first + result.back().second->type, nullptr);
result.emplace_back(result.back().first + result.back().second->type + (WDIM == 2 ? 2 : 0), nullptr);
// result.emplace_back(isize(cgi.wallstart), nullptr);
return result;
}