-/* $NetBSD: machdep.c,v 1.6 1997/10/12 11:45:19 lukem Exp $ */
+/* $NetBSD: machdep.c,v 1.7 1998/07/21 07:01:54 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
#if 0
static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: machdep.c,v 1.6 1997/10/12 11:45:19 lukem Exp $");
+__RCSID("$NetBSD: machdep.c,v 1.7 1998/07/21 07:01:54 hubertf Exp $");
#endif
#endif /* not lint */
int
md_gseed()
{
- return(getpid());
+ time_t seconds;
+
+ time(&seconds);
+ return((int) seconds);
}
/* md_exit():
-/* $NetBSD: monster.c,v 1.4 1997/10/12 11:45:28 lukem Exp $ */
+/* $NetBSD: monster.c,v 1.5 1998/07/21 07:01:55 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
#if 0
static char sccsid[] = "@(#)monster.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: monster.c,v 1.4 1997/10/12 11:45:28 lukem Exp $");
+__RCSID("$NetBSD: monster.c,v 1.5 1998/07/21 07:01:55 hubertf Exp $");
#endif
#endif /* not lint */
void
mv_mons()
{
- object *monster, *next_monster;
+ object *monster, *next_monster, *test_mons;
boolean flew;
if (haste_self % 2) {
if (!(flew && mon_can_go(monster, rogue.row, rogue.col))) {
mv_1_monster(monster, rogue.row, rogue.col);
}
-NM: monster = next_monster;
+NM: test_mons = level_monsters.next_monster;
+ monster = NULL;
+ while (test_mons)
+ {
+ if (next_monster == test_mons)
+ {
+ monster = next_monster;
+ break;
+ }
+ test_mons = test_mons -> next_monster;
+ }
}
}