Simplify how plane cargo is tracked
Fold struct plist members bombs (used for bombing runs) and misc (used for everything else) into a single member load.
This commit is contained in:
parent
d3f5fee64b
commit
54b1c04686
7 changed files with 18 additions and 28 deletions
|
@ -956,10 +956,7 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
|
|||
if (item[itype] < needed)
|
||||
return -1;
|
||||
item[itype] -= needed;
|
||||
if (itype == I_SHELL && (mission == 's' || mission == 'p'))
|
||||
plp->bombs = needed;
|
||||
else
|
||||
plp->misc = needed;
|
||||
plp->load = needed;
|
||||
}
|
||||
|
||||
if (pp->pln_ship >= 0)
|
||||
|
@ -1048,7 +1045,7 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
|
|||
if ((mission == MI_SINTERDICT) && !(plp->pcp->pl_flags & P_A))
|
||||
continue;
|
||||
|
||||
if (!plp->bombs)
|
||||
if (!plp->load)
|
||||
continue;
|
||||
|
||||
newdam = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue