Old revision #pna6tfy4s | New revision #pcutdxwf1 | ||
---|---|---|---|
1 | /* old code */ | 1 | /** |
2 | * Check whether a script, be it AI or GS, is dead in this slot. | ||
3 | * @note Also returns dead for AI slots which are currently occupied | ||
4 | * by Human Companies or when the AI didn't start. | ||
5 | * @note Also returns dead when no GS was set up. | ||
6 | * @param slot The slot that is checked. | ||
7 | * @return true if the slot that is checked is dead. | ||
8 | */ | ||
2 | static bool IsDead(CompanyID slot) | 9 | static bool IsDead(CompanyID slot) |
3 | { | 10 | { |
4 | if (slot == OWNER_DEITY) { | 11 | if (slot == OWNER_DEITY) { | … | … |
6 | } else { | 13 | } else { |
7 | return !Company::IsValidAiID(slot) || Company::Get(slot)->ai_instance->IsDead(); | 14 | return !Company::IsValidAiID(slot) || Company::Get(slot)->ai_instance->IsDead(); |
8 | } | 15 | } |
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | |||
22 | |||
23 | |||
24 | |||
25 | |||
26 | |||
27 | |||
28 | |||
29 | |||
30 | |||
31 | } | 16 | } |