(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.
This commit is contained in:
Ron Koenderink 2006-08-02 18:39:22 +00:00
parent de124108de
commit 74b263f3d8

View file

@ -348,7 +348,7 @@ unit_map(int unit_type, int uid, struct nstr_sect *nsp, char *originp)
char *name; char *name;
gp = get_empobjp(unit_type, uid); 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; return RET_FAIL;
if (unit_type == EF_NUKE) if (unit_type == EF_NUKE)