1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-26 07:50:08 +00:00

3d:: fixed invis_point and behindsphere

This commit is contained in:
Zeno Rogue 2019-04-03 20:32:30 +02:00
parent 217a643605
commit 6b91dc2d7d

View File

@ -709,11 +709,11 @@ bool behindsphere(const hyperpoint& h) {
if(mdBandAny()) return false;
if(vid.alpha > 1) {
if(h[2] > -1/vid.alpha) return true;
if(h[DIM] > -1/vid.alpha) return true;
}
if(vid.alpha <= 1) {
if(h[2] < .2-vid.alpha) return true;
if(h[DIM] < .2-vid.alpha) return true;
}
return false;
@ -786,7 +786,7 @@ transmatrix applyspin(const heptspin& hs, const transmatrix& V) {
}
bool invis_point(const hyperpoint h) {
if(DIM == 2 || sphere) return false;
if(DIM == 2 || sphere || pmodel != mdPerspective) return false;
return h[2] < 0;
}