| 321 | } |
| 322 | |
| 323 | void PushProtectedUnit(df::unit *unit) { |
| 324 | if(Units::isFemale(unit)) { |
| 325 | if(Units::isBaby(unit) || Units::isChild(unit)) |
| 326 | fk_prot++; |
| 327 | else |
| 328 | fa_prot++; |
| 329 | } |
| 330 | else { //treat sex n/a like it was male |
| 331 | if(Units::isBaby(unit) || Units::isChild(unit)) |
| 332 | mk_prot++; |
| 333 | else |
| 334 | ma_prot++; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | void ClearUnits() { |
| 339 | fk_prot = fa_prot = mk_prot = ma_prot = 0; |