summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-31 21:43:07 +0000
committeralberth <alberth@openttd.org>2010-07-31 21:43:07 +0000
commit7aabb887d4b613d02addf5b705d15c5f2c329208 (patch)
tree122ebe335d3f897b0ac451ffa701981258c65400 /src/company_cmd.cpp
parentb65a9eb85629006336e16db707bbc2a8a84c8593 (diff)
downloadopenttd-7aabb887d4b613d02addf5b705d15c5f2c329208.tar.xz
(svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the function and two company globals.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 7605a563b..414363aed 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -39,8 +39,8 @@
#include "table/strings.h"
-CompanyByte _local_company;
-CompanyByte _current_company;
+CompanyByte _local_company; ///< Company controlled by the human player at this client. Can also be #COMPANY_SPECTATOR.
+CompanyByte _current_company; ///< Company currently doing an action.
/* NOSAVE: can be determined from company structs */
Colours _company_colours[MAX_COMPANIES];
CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg
@@ -97,7 +97,7 @@ void SetLocalCompany(CompanyID new_company)
InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
#endif
- assert(_current_company == _local_company);
+ assert(IsLocalCompany());
_current_company = _local_company = new_company;