(new) [_WIN32]: Rely on misc.h to provide BSD random functions.
This commit is contained in:
parent
7a95982a21
commit
667b137216
1 changed files with 1 additions and 7 deletions
|
@ -65,7 +65,6 @@ new(void)
|
||||||
struct boundstr newrealms;
|
struct boundstr newrealms;
|
||||||
struct range absrealm;
|
struct range absrealm;
|
||||||
natid num;
|
natid num;
|
||||||
time_t now;
|
|
||||||
coord x, y;
|
coord x, y;
|
||||||
int i;
|
int i;
|
||||||
s_char *p;
|
s_char *p;
|
||||||
|
@ -104,12 +103,7 @@ new(void)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(void)time(&now);
|
srandom(time(NULL));
|
||||||
#if !defined(_WIN32)
|
|
||||||
srandom(now);
|
|
||||||
#else
|
|
||||||
srand(now);
|
|
||||||
#endif
|
|
||||||
for (i = 0; i < 300 && !player->aborted; i++) {
|
for (i = 0; i < 300 && !player->aborted; i++) {
|
||||||
/* Both x and y should be either odd or even */
|
/* Both x and y should be either odd or even */
|
||||||
x = (random() % WORLD_X) - (WORLD_X / 2);
|
x = (random() % WORLD_X) - (WORLD_X / 2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue