1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

you can no longer go through walls in portalspaces

This commit is contained in:
Zeno Rogue 2021-03-21 10:42:36 +01:00
parent 8a6f1764d2
commit b55eb5721e
2 changed files with 12 additions and 0 deletions

View File

@ -1371,4 +1371,9 @@ EX int valence() {
return S3;
}
/** portalspaces are not defined outside of a boundary */
EX bool is_boundary(cell *c) {
return (cgflags & qPORTALSPACE) && isWall(c->wall);
}
}

View File

@ -1955,6 +1955,8 @@ EX void centerpc(ld aspd) {
ors::rerotate(W); ors::rerotate(cwtV.T); ors::rerotate(View);
}
EX transmatrix oView;
EX void optimizeview() {
if(subscreens::split(optimizeview)) return;
@ -1971,6 +1973,11 @@ EX void optimizeview() {
View = iview_inverse(iView);
fixmatrix(View);
if(is_boundary(centerover))
centerover = c, View = oView;
else
oView = View;
#if CAP_ANIMATIONS
if(centerover && inmirror(centerover)) {