/**
* Check whether a Game Script is not running, or if it is running, if it is dead.
* Check whether an AI slot is not started, or if it is started, it is not an AI, or if it is an AI, if it is dead.
* @param slot The slot that is checked.
* @return true if the slot that is checked is dead.
*/
static bool IsDead(CompanyID slot)
{
if (slot == OWNER_DEITY) {
return Game::GetInstance() == NULL || Game::GetInstance()->IsDead();
} else {
return !Company::IsValidAiID(slot) || Company::Get(slot)->ai_instance->IsDead();
}
}