(unit_map): Replace player->owner with direct owner check.

player->owner if not set if ef_ptr() is used as no post_read() is done.
Broken in rev 1.38.
This commit is contained in:
Ron Koenderink 2006-07-30 01:05:17 +00:00
parent fa0b12e332
commit 55107731cc

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 || !player->owner || gp->own == 0) if (!gp || gp->own != player->cnum || gp->own == 0)
return RET_FAIL; return RET_FAIL;
if (unit_type == EF_NUKE) if (unit_type == EF_NUKE)