Avoid ‘bad corpseNum’ errors.

This is caused by spectating bots (bots branch) being killed.

I noticed that buildings such as the overmind continued ‘attacking’ even
though the bot(s) near it had been moved to spectators. Marking the entity
as not taking damage when spectating fixed that, but then the attack resumed
as soon as it was put back on the human team until it was respawned.

Solution: allow damage to be taken only when on a team and not spectating.