-/* $NetBSD: hack.dog.c,v 1.7 2006/03/30 01:25:52 jnemeth Exp $ */
+/* $NetBSD: hack.dog.c,v 1.9 2008/01/28 06:55:41 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.dog.c,v 1.7 2006/03/30 01:25:52 jnemeth Exp $");
+__RCSID("$NetBSD: hack.dog.c,v 1.9 2008/01/28 06:55:41 dholland Exp $");
#endif /* not lint */
#include "hack.h"
/* Note: if apport == 1 then our behaviour is independent of udist */
if (mtmp->minvent) {
if (!rn2(udist) || !rn2((int) edog->apport))
- if (rn2(10) < edog->apport) {
+ if ((unsigned) rn2(10) < edog->apport) {
relobj(mtmp, (int) mtmp->minvis);
if (edog->apport > 1)
edog->apport--;
goto eatobj;
}
if (obj->owt < 10 * mtmp->data->mlevel)
- if (rn2(20) < edog->apport + 3)
+ if ((unsigned) rn2(20) < edog->apport + 3)
if (rn2(udist) || !rn2((int) edog->apport)) {
freeobj(obj);
unpobj(obj);
}
} else if (gtyp == UNDEF && dogroom >= 0 &&
uroom == dogroom &&
- !mtmp->minvent && edog->apport > rn2(8)) {
+ !mtmp->minvent && edog->apport > (unsigned)rn2(8)) {
gx = obj->ox;
gy = obj->oy;
gtyp = APPORT;
ny = poss[i].y;
if (info[i] & ALLOW_M) {
mtmp2 = m_at(nx, ny);
- if (mtmp2 = NULL)
+ if (mtmp2 == NULL)
panic("error in dog_move");
if (mtmp2->data->mlevel >= mdat->mlevel + 2 ||
mtmp2->data->mlet == 'c')