1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-11 18:00:34 +00:00

fixed textures on the sphere

This commit is contained in:
Zeno Rogue 2017-12-09 20:01:50 +01:00
parent d1a4a6cb25
commit 29d6624d32

View File

@ -157,10 +157,12 @@ void perform_mapping() {
cell *c = p.first; cell *c = p.first;
auto si = getpatterninfo0(c); auto si = getpatterninfo0(c);
bool replace = false; bool replace = false;
int sgn = sphere ? -1 : 1;
if(!texture_map.count(si.id)) if(!texture_map.count(si.id))
replace = true; replace = true;
else if(p.second[2][2] < texture_map[si.id].M[2][2]) else if(sgn * p.second[2][2] < sgn * texture_map[si.id].M[2][2])
replace = true; replace = true;
if(replace) { if(replace) {