1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-03 12:49:17 +00:00

fixed rug buggy in web

This commit is contained in:
Zeno Rogue 2019-09-26 13:18:45 +02:00
parent 1215c65e40
commit 128e063e27

View File

@ -1487,7 +1487,7 @@ EX transmatrix currentrot;
EX void reopen() { EX void reopen() {
if(rugged) return; if(rugged) return;
rugdim = 2 * GDIM - 1; rugdim = 2 * GDIM - 1;
when_enabled = ticks; when_enabled = 0;
GLERR("before init"); GLERR("before init");
glbuf = new renderbuffer(TEXTURESIZE, TEXTURESIZE, vid.usingGL && !rendernogl); glbuf = new renderbuffer(TEXTURESIZE, TEXTURESIZE, vid.usingGL && !rendernogl);
if(!glbuf->valid) { if(!glbuf->valid) {
@ -1673,6 +1673,7 @@ EX void actDraw() {
drawRugScene(); drawRugScene();
#if CAP_ORIENTATION #if CAP_ORIENTATION
if(!when_enabled) ticks = when_enabled;
if(ticks < when_enabled + 500) if(ticks < when_enabled + 500)
last_orientation = getOrientation(); last_orientation = getOrientation();
else { else {