From 74b263f3d8aca873f0a9734acb41a97a649f33f7 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Wed, 2 Aug 2006 18:39:22 +0000 Subject: [PATCH] (unit_map): Replace player->owner with direct owner check and player->god check. player->owner is not set if ef_ptr() is used as no post_read() is done. Broken in rev 1.38. Not completely fixed in rev 1.40. --- src/lib/common/maps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/common/maps.c b/src/lib/common/maps.c index 4139f240..eb5d9601 100644 --- a/src/lib/common/maps.c +++ b/src/lib/common/maps.c @@ -348,7 +348,7 @@ unit_map(int unit_type, int uid, struct nstr_sect *nsp, char *originp) char *name; gp = get_empobjp(unit_type, uid); - if (!gp || gp->own != player->cnum || gp->own == 0) + if (!gp || (gp->own != player->cnum && !player->god) || gp->own == 0) return RET_FAIL; if (unit_type == EF_NUKE)