snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
if (lp->lnd_own != sp->sct_own)
continue;
* Try not to kill any unit.
*/
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
nunits++;
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
nunits++;
/* kill some security troops */
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
continue;
/* kill some normal troops */
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
continue;
/* Hmm.. still some left.. kill off units now */
/* kill some normal troops */
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
continue;
/* Hmm.. still some left.. kill off units now */
/* kill some security troops */
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+ while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
continue;
np->nat_money -= mult * mp->m_cost * build / 100.0;
if (!player->simulation)
- ship->shp_effic += (s_char)build;
+ ship->shp_effic += build;
return 1;
}
/* doit - only steal food from land units during the update */
if (ifood_eaten > sp->shp_item[I_FOOD] && sp->shp_nland > 0 && doit) {
snxtitem_all(&ni, EF_LAND);
- while ((lp = (struct lndstr *)nxtitemp(&ni, 0)) &&
+ while ((lp = (struct lndstr *)nxtitemp(&ni)) &&
ifood_eaten > sp->shp_item[I_FOOD]) {
if (lp->lnd_ship != sp->shp_uid)
continue;