summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-03 17:01:25 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-03 17:01:25 +0100
commitc4abe1ed6a764bf27844e157370bd8ea9d06efc6 (patch)
treef5b071819229033a7f2f82d2daf93925c10b4ff6
parentcClientHandle: split packet handling into separate functions for clarity (diff)
downloadcuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar.gz
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar.bz2
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar.lz
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar.xz
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.tar.zst
cuberite-c4abe1ed6a764bf27844e157370bd8ea9d06efc6.zip
Diffstat (limited to '')
-rw-r--r--source/MersenneTwister.h3
-rw-r--r--source/StringUtils.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/source/MersenneTwister.h b/source/MersenneTwister.h
index e87fe0f9b..cdb1730c0 100644
--- a/source/MersenneTwister.h
+++ b/source/MersenneTwister.h
@@ -238,6 +238,8 @@ inline void MTRand::seed()
// Otherwise use a hash of time() and clock() values
// First try getting an array from /dev/urandom
+
+ /* // Commented out by FakeTruth because doing this 200 times a tick is SUUUUPEERRR SLOW!!~~!ÕNe
FILE* urandom = fopen( "/dev/urandom", "rb" );
if( urandom )
{
@@ -250,6 +252,7 @@ inline void MTRand::seed()
fclose(urandom);
if( success ) { seed( bigSeed, N ); return; }
}
+ */
// Was not successful, so use time() and clock() instead
seed( hash( time(NULL), clock() ) );
diff --git a/source/StringUtils.h b/source/StringUtils.h
index 8805c1d99..3f4bdef1a 100644
--- a/source/StringUtils.h
+++ b/source/StringUtils.h
@@ -11,6 +11,10 @@
+#ifndef _WIN32
+#include <stdarg.h>
+#endif
+
typedef std::string AString;