if (stopping)
continue;
- mines = getvar(V_MINE, (s_char *)§, EF_SECTOR);
+ mines = sect.sct_mines;
if ((mcp->m_flags & M_SWEEP) && mines > 0 && !player->owner) {
max = vl_find(V_SHELL, mcp->m_vtype,
mcp->m_vamt, (int)mcp->m_nv);
- shells = getvar(V_SHELL, (s_char *)sp, EF_SHIP);
+ shells = sp->shp_item[I_SHELL];
for (m = 0; mines > 0 && m < 5; m++) {
if (chance(0.66)) {
mines--;
shells = min(max, shells + 1);
}
}
- putvar(V_MINE, mines, (s_char *)§, EF_SECTOR);
- putvar(V_SHELL, shells, (s_char *)sp, EF_SHIP);
+ sect.sct_mines = mines;
+ sect.sct_item[I_SHELL] = shells;
putsect(§);
}
if (mines > 0 && !player->owner && chance(DMINE_HITCHANCE(mines))) {
m = MINE_DAMAGE();
shipdamage(sp, m);
mines--;
- putvar(V_MINE, mines, (s_char *)§, EF_SECTOR);
+ sect.sct_mines = mines;
putsect(§);
if (sp->shp_effic < SHIP_MINEFF)
time_to_stop = 1;
if (stopping)
continue;
- mines = getvar(V_MINE, (s_char *)§, EF_SECTOR);
+ mines = sect.sct_mines;
if ((lcp->l_flags & L_ENGINEER) && mines > 0 &&
(sect.sct_oldown != lp->lnd_own)) {
max = vl_find(V_SHELL, lcp->l_vtype,
lcp->l_vamt, (int)lcp->l_nv);
- shells = getvar(V_SHELL, (s_char *)lp, EF_LAND);
+ shells = lp->lnd_item[I_SHELL];
for (m = 0; mines > 0 && m < 5; m++) {
if (chance(0.66)) {
mines--;
shells = min(max, shells + 1);
}
}
- putvar(V_MINE, mines, (s_char *)§, EF_SECTOR);
- putvar(V_SHELL, shells, (s_char *)lp, EF_LAND);
+ sect.sct_mines = mines;
+ lp->lnd_item[I_SHELL] = shells;
putsect(§);
}
if (mines > 0 && (sect.sct_oldown != lp->lnd_own) &&
m = MINE_LDAMAGE();
landdamage(lp, m);
mines--;
- putvar(V_MINE, mines, (s_char *)§, EF_SECTOR);
+ sect.sct_mines = mines;
putsect(§);
if (lp->lnd_effic < LAND_MINEFF)
time_to_stop = 1;