1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

fixed disable_texture in rug

This commit is contained in:
Zeno Rogue 2020-07-08 15:48:01 +02:00
parent 8223bf354f
commit aefbe6cdbc

View File

@ -1094,6 +1094,7 @@ EX void drawRugScene() {
rug.offset_texture = 0; rug.offset_texture = 0;
rug.tinf = &tinf; rug.tinf = &tinf;
if(disable_texture) rug.tinf = nullptr;
rug.flags = POLY_TRIANGLES | POLY_FAT | POLY_PRINTABLE | POLY_ALWAYS_IN | POLY_ISSIDE | POLY_SHADE_TEXTURE; rug.flags = POLY_TRIANGLES | POLY_FAT | POLY_PRINTABLE | POLY_ALWAYS_IN | POLY_ISSIDE | POLY_SHADE_TEXTURE;
dynamicval<projection_configuration> p(pconf, rconf); dynamicval<projection_configuration> p(pconf, rconf);
@ -1129,7 +1130,7 @@ EX void reopen() {
ensure_glbuf(); ensure_glbuf();
if(!glbuf) { rugged = false; return; } if(!glbuf) { rugged = false; return; }
rugged = true; rugged = true;
if(renderonce) prepareTexture(); if(renderonce && !disable_texture) prepareTexture();
if(!rugged) return; if(!rugged) return;
} }
@ -1274,7 +1275,7 @@ EX ld ruggospeed = 1;
EX void actDraw() { EX void actDraw() {
try { try {
if(!renderonce) prepareTexture(); if(!renderonce && !disable_texture) prepareTexture();
else if(renderlate) { else if(renderlate) {
renderlate--; renderlate--;
prepareTexture(); prepareTexture();