-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bankrupcy counter update does not trigger company update admin message #7491
Comments
PeterN
added a commit
that referenced
this issue
Apr 11, 2019
LordAro
pushed a commit
that referenced
this issue
May 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: