engine tweak: static seed for random light calculation

repeated recalcs now produce the same lighting - also, every player
gets to see the same map
This commit is contained in:
ac-stef
2014-05-15 13:48:31 +02:00
parent b38fd1b57b
commit 34b99ca713
+7 -2
View File
@@ -177,14 +177,19 @@ void calclight()
s->b = acol.z;
}
uint keep = randomMT();
seedMT(ents.length() + hdr.maprevision);
loopv(ents)
{
entity &e = ents[i];
if(e.type==LIGHT) calclightsource(e);
}
block b = { 1, 1, ssize-2, ssize-2 };
postlightarea(b);
seedMT(keep);
block bb = { 1, 1, ssize-2, ssize-2 };
postlightarea(bb);
setvar("fullbright", 0);
lastcalclight = totalmillis;
}