From 7e52b1f3407a57bfaef34e38eeaa3efefa072625 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 20 Aug 2018 16:28:25 +0200 Subject: [PATCH] sightrange of 30 was not enough on some spheres --- classes.h | 2 +- floorshapes.cpp | 3 +++ goldberg.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes.h b/classes.h index 3490ab2a..288eb8c3 100644 --- a/classes.h +++ b/classes.h @@ -222,7 +222,7 @@ static const int qDOCKS = 16; static const int qZEBRA = 32; // note: dnext assumes that x&7 equals 7 -static const int SEE_ALL = 15; +static const int SEE_ALL = 50; static const int FORBIDDEN = -1; extern eGeometry geometry; diff --git a/floorshapes.cpp b/floorshapes.cpp index 709c4bff..b21ec081 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -553,6 +553,9 @@ namespace gp { sidir = 0; } auto& id = pshid[siid][sidir][draw_li.relative.first&31][draw_li.relative.second&31][fix6(draw_li.total_dir)]; + if(id == -1 && sphere && isize(shFloor.b) > 0) { + forCellEx(c1, c) if(!gmatrix.count(c1)) return 0; + } if(id == -1) build_plainshape(id, draw_li, c, siid, sidir); return id; } diff --git a/goldberg.cpp b/goldberg.cpp index b4965357..02dea714 100644 --- a/goldberg.cpp +++ b/goldberg.cpp @@ -594,8 +594,8 @@ namespace hr { namespace gp { base_distlimit = (base_distlimit + log(scale) / log(2.618)) / scale; else base_distlimit = 3 * max(param.first, param.second) + 2 * min(param.first, param.second); - if(base_distlimit > 30) - base_distlimit = 30; + if(base_distlimit > SEE_ALL) + base_distlimit = SEE_ALL; prepare_matrices(); if(debug_geometry) Xprintf("scale = " LDF "\n", scale);