forked from Mirrors/openclonk
c4script-cli: Initialize PRNG
parent
78509e0757
commit
8254621b95
|
@ -28,6 +28,7 @@
|
||||||
#include <C4Reloc.h>
|
#include <C4Reloc.h>
|
||||||
#include <C4Record.h>
|
#include <C4Record.h>
|
||||||
#include <C4MapScript.h>
|
#include <C4MapScript.h>
|
||||||
|
#include <C4Random.h>
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
C4Set<C4PropList *> C4PropList::PropLists;
|
C4Set<C4PropList *> C4PropList::PropLists;
|
||||||
|
@ -109,6 +110,9 @@ int c4s_runscript(const char * filename)
|
||||||
{
|
{
|
||||||
InitCoreFunctionMap(&ScriptEngine);
|
InitCoreFunctionMap(&ScriptEngine);
|
||||||
|
|
||||||
|
// Seed PRNG
|
||||||
|
FixedRandom(time(NULL));
|
||||||
|
|
||||||
C4Group File;
|
C4Group File;
|
||||||
if (!File.Open(GetWorkingDirectory()))
|
if (!File.Open(GetWorkingDirectory()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue