Replace getvec() by direct, read-only item access in some cases where

that's obviously correct.
This commit is contained in:
Markus Armbruster 2004-03-05 12:05:33 +00:00
parent 4f6e806975
commit 7d7945c3e9
6 changed files with 28 additions and 51 deletions

View file

@ -306,7 +306,6 @@ deity_build_land(int type, coord x, coord y, natid own, int tlev)
struct lchrstr *lp;
struct nstr_item nstr;
struct natstr *natp;
int lvec[I_MAX + 1];
int extend = 1;
natp = getnatp(own);
@ -363,12 +362,7 @@ deity_build_land(int type, coord x, coord y, natid own, int tlev)
land.lnd_fuelu = (int)LND_FU(lp->l_fuelu, tlev - lp->l_tech);
land.lnd_maxlight = (int)LND_XPL(lp->l_nxlight, tlev - lp->l_tech);
land.lnd_maxland = (int)LND_MXL(lp->l_mxland, tlev - lp->l_tech);
getvec(VT_ITEM, lvec, (s_char *)&land, EF_LAND);
lvec[I_FOOD] +=
vl_find(V_FOOD, lp->l_vtype, lp->l_vamt, (int)lp->l_nv);
lvec[I_MILIT] = lp->l_mil;
putvec(VT_ITEM, lvec, (s_char *)&land, EF_LAND);
land.lnd_item[I_FOOD] = vl_find(V_FOOD, lp->l_vtype, lp->l_vamt, lp->l_nv);
putland(land.lnd_uid, &land);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,