You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetworkAdminCompanyUpdate to be called (via CompanyAdminUpdate when the bankrupcy counter updates)
Actual result
Nothing
Steps to reproduce
Listen on admin port, request ADMIN_UPDATE_COMPANY_INFO with frequency ADMIN_FREQUENCY_AUTOMATIC
Create a company (this sends a ADMIN_PACKET_SERVER_COMPANY_NEW and ADMIN_PACKET_SERVER_COMPANY_INFO)
Change the company name (this sends a ADMIN_PACKET_SERVER_COMPANY_UPDATE )
3b. Changing the primary color, president name or password also triggers this
Spend all the company's money, have some monthly expenses to trigger the bankrupcy counter
Do not receive any ADMIN_PACKET_SERVER_COMPANY_UPDATE until the company goes bankrupt
5b. Optionally, send an ADMIN_POLL for ADMIN_UPDATE_COMPANY_INFO with the extra flag set to the company id or UINT32_MAX, and you will recive a new ADMIN_PACKET_SERVER_COMPANY_INFO, but with the correct bankruptcy counter filled. This indicates that the value is updated, just not sent when it updates.
Judging from https://github.com/OpenTTD/OpenTTD/blob/master/src/economy.cpp#L569-L647 I see that the counter gets updated (and processed) there, but CompanyAdminUpdate is not called there. The most sane locations would be in the case 4 and case 7, together with normal processing. (There really is no need to send an update message when the counter sent in the update only updates every 3 months).
The text was updated successfully, but these errors were encountered:
PeterN
added a commit
to PeterN/OpenTTD
that referenced
this issue
Apr 9, 2019
Version of OpenTTD
1.9.1
Expected result
NetworkAdminCompanyUpdate
to be called (viaCompanyAdminUpdate
when the bankrupcy counter updates)Actual result
Nothing
Steps to reproduce
ADMIN_UPDATE_COMPANY_INFO
with frequencyADMIN_FREQUENCY_AUTOMATIC
ADMIN_PACKET_SERVER_COMPANY_NEW
andADMIN_PACKET_SERVER_COMPANY_INFO
)ADMIN_PACKET_SERVER_COMPANY_UPDATE
)3b. Changing the primary color, president name or password also triggers this
ADMIN_PACKET_SERVER_COMPANY_UPDATE
until the company goes bankrupt5b. Optionally, send an
ADMIN_POLL
forADMIN_UPDATE_COMPANY_INFO
with the extra flag set to the company id orUINT32_MAX
, and you will recive a newADMIN_PACKET_SERVER_COMPANY_INFO
, but with the correct bankruptcy counter filled. This indicates that the value is updated, just not sent when it updates.Judging from https://github.com/OpenTTD/OpenTTD/blob/master/src/economy.cpp#L569-L647 I see that the counter gets updated (and processed) there, but
CompanyAdminUpdate
is not called there. The most sane locations would be in the case 4 and case 7, together with normal processing. (There really is no need to send an update message when the counter sent in the update only updates every 3 months).The text was updated successfully, but these errors were encountered: