]> git.pond.sub.org Git - empserver/commitdiff
(unit_map): Replace player->owner with direct owner check and
authorRon Koenderink <rkoenderink@yahoo.ca>
Wed, 2 Aug 2006 18:39:22 +0000 (18:39 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Wed, 2 Aug 2006 18:39:22 +0000 (18:39 +0000)
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

index 4139f240eaf0f4fbe17099c8071cdc97b5f30ac8..eb5d9601e9f313d0ce2c6e3b5b7d11f43c67ffd7 100644 (file)
@@ -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)