properly seed the pseudo-random number generator

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2994 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-13 06:30:18 +00:00
parent a713613647
commit e1334495e1
3 changed files with 2 additions and 6 deletions
-4
View File
@@ -117,14 +117,10 @@ void calclightsource(const persistent_entity &l, float fade = 1, bool flicker =
int sy = l.y-reach;
int ey = l.y+reach;
rndreset();
const float s = 0.8f;
for(float sx2 = (float)sx; sx2<=ex; sx2+=s*2) { lightray(sx2, (float)sy, l, fade, flicker); lightray(sx2, (float)ey, l, fade, flicker); }
for(float sy2 = sy+s; sy2<=ey-s; sy2+=s*2) { lightray((float)sx, sy2, l, fade, flicker); lightray((float)ex, sy2, l, fade, flicker); }
rndtime();
}
void postlightarea(const block &a) // median filter, smooths out random noise in light and makes it more mipable