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:
parent
8a6f1764d2
commit
b55eb5721e
5
cell.cpp
5
cell.cpp
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user