* Remove a monster from the region list (it left or died...) */
| 189 | * Remove a monster from the region list (it left or died...) |
| 190 | */ |
| 191 | void |
| 192 | remove_mon_from_reg(NhRegion *reg, struct monst *mon) |
| 193 | { |
| 194 | int i; |
| 195 | |
| 196 | for (i = 0; i < reg->n_monst; i++) |
| 197 | if (reg->monsters[i] == mon->m_id) { |
| 198 | reg->n_monst--; |
| 199 | reg->monsters[i] = reg->monsters[reg->n_monst]; |
| 200 | return; |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | /* |
| 205 | * Check if a monster is inside the region. |
no outgoing calls
no test coverage detected