From c7fa610be3b6e072d3da4611f6de72390ebbf446 Mon Sep 17 00:00:00 2001 From: "mtilden@gmail.com" Date: Mon, 26 Dec 2011 09:09:47 +0000 Subject: - Linux compatible fixes including updated makefile - Mersenne Twister still says uint32 but it's now signed for compatibility with random uses needing negative values - Server seed is sent to clients, but needs to be able to be signed long long later on for authentic reasons - Protocol Version is required to match to ensure client compatibility, this should probably have a settings.ini check as well as store the value there git-svn-id: http://mc-server.googlecode.com/svn/trunk@121 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cPassiveMonster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/cPassiveMonster.cpp') diff --git a/source/cPassiveMonster.cpp b/source/cPassiveMonster.cpp index bbfbc83ed..1f11484ef 100644 --- a/source/cPassiveMonster.cpp +++ b/source/cPassiveMonster.cpp @@ -1,4 +1,5 @@ #include "cPassiveMonster.h" +#include "MersenneTwister.h" cPassiveMonster::cPassiveMonster() @@ -24,7 +25,8 @@ void cPassiveMonster::Tick(float a_Dt) if(m_SeePlayerInterval > 1) { - int rem = rand() % 3 + 1; //check most of the time but miss occasionally + MTRand r1; + int rem = r1.randInt() % 3 + 1; //check most of the time but miss occasionally m_SeePlayerInterval = 0.0; if(rem >= 2) { -- cgit v1.2.3