equal
deleted
inserted
replaced
10 #include "../../variables.h" |
10 #include "../../variables.h" |
11 #include "table/strings.h" |
11 #include "table/strings.h" |
12 |
12 |
13 AICompany::CompanyIndex AICompany::ResolveCompanyIndex(AICompany::CompanyIndex company) |
13 AICompany::CompanyIndex AICompany::ResolveCompanyIndex(AICompany::CompanyIndex company) |
14 { |
14 { |
15 if (company == MY_COMPANY) return (CompanyIndex)_current_player; |
15 if (company == MY_COMPANY) return (CompanyIndex)((byte)_current_player); |
16 |
16 |
17 return (IsValidPlayer((PlayerID)company) && GetPlayer((PlayerID)company)->is_active) ? company : INVALID_COMPANY; |
17 return (IsValidPlayer((PlayerID)company) && GetPlayer((PlayerID)company)->is_active) ? company : INVALID_COMPANY; |
18 } |
18 } |
19 |
19 |
20 bool AICompany::SetCompanyName(const char *name) |
20 bool AICompany::SetCompanyName(const char *name) |