Loading

Revision differences

Old revision #pi7dgzowbNew revision #pqfngbwiy
  1        bool is_gs_slot = this->selected_slot == OWNER_DEITY;  
  2        bool invalid_slot = this->selected_slot == INVALID_COMPANY;  
  3        bool is_orange_slot = IsEditable((CompanyID)(this->selected_slot)) && !Company::IsValidID(this->selected_slot);  
  4        bool is_green_slot = IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead();  
  5        bool is_red_slot = IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && Company::Get(this->selected_slot)->ai_instance->IsDead();  
  6        bool is_silver_slot_above = !IsEditable((CompanyID)(this->selected_slot - 1));  
  7        bool is_silver_slot_below = !IsEditable((CompanyID)(this->selected_slot + 1));  
  8        bool is_orange_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && !Company::IsValidID(this->selected_slot - 1);  
  9        bool is_orange_slot_below = IsEditable((CompanyID)(this->selected_slot + 1)) && !Company::IsValidID(this->selected_slot + 1);  
  10        bool is_green_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && Company::IsValidID(this->selected_slot - 1) && Company::IsValidAiID(this->selected_slot - 1) && !Company::Get(this->selected_slot - 1)->ai_instance->IsDead();  
  11        bool is_green_slot_below = IsEditable((CompanyID)(this->selected_slot + 1)) && Company::IsValidID(this->selected_slot + 1) && Company::IsValidAiID(this->selected_slot + 1) && !Company::Get(this->selected_slot + 1)->ai_instance->IsDead();  
  12        bool is_red_slot_above = IsEditable((CompanyID)(this->selected_slot - 1)) && Company::IsValidID(this->selected_slot - 1) && Company::IsValidAiID(this->selected_slot - 1) && Company::Get(this->selected_slot - 1)->ai_instance->IsDead();  
  13        bool is_red_slot_below = IsEditable((CompanyID)(this->selected_slot + 1)) && Company::IsValidID(this->selected_slot + 1) && Company::IsValidAiID(this->selected_slot + 1) && Company::Get(this->selected_slot + 1)->ai_instance->IsDead();  
  14  
  15  
1Check first slot:                                                            Check second slot:  16Check first slot:                                                            Check second slot:  
2is_gs_slot    = false    // GS slot isn't selected                                silver:  17is_gs_slot    = false    // GS slot isn't selected                                silver:  
3is_gs_slot    = true    // GS slot is selected, and thus, unmovable                IsEditable    = false    // human player in this slot, or outside slot range of 1-15, and thus, unmovable  18is_gs_slot    = true    // GS slot is selected, and thus, unmovable                IsEditable    = false    // human player in this slot, or outside slot range of 1-15, and thus, unmovable