Jonathan G Rennison
ac1071f4fc
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/station_cmd.cpp
# src/vehicle_gui.cpp
2 years ago
Tyler Trahan
07443969f9
Fix ca19a0d: Network hosts also use favorite face
2 years ago
Tyler Trahan
6d84b1e108
Fix ca19a0d: Send the proper network command when loading favorite face
2 years ago
Jonathan G Rennison
175ef00985
Avoid dangling company purchase timeout when no clients connected to company
2 years ago
Jonathan G Rennison
ad9d593a51
Fix assertion failure setting player face for new company in multiplayer
...
See: https://github.com/OpenTTD/OpenTTD/issues/10016
2 years ago
Jonathan G Rennison
3d857333c8
Reduce delays with company bankrupcty/sale processing at high day lengths
2 years ago
Jonathan G Rennison
23fa7cd239
Improve handling of company sales
...
Avoid conflicts between bankruptcy and manual company sale paths
2 years ago
Jonathan G Rennison
dc5e073379
Merge branch 'master' into jgrpp
2 years ago
Tyler Trahan
788b06fe0f
Change: New player companies use favorite manager face, if saved ( #9895 )
2 years ago
Jonathan G Rennison
5b7db9d849
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/commit-checker.yml
# src/command.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/crashlog.cpp
# src/economy.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/misc_gui.cpp
# src/newgrf_config.cpp
# src/openttd.cpp
# src/settings_gui.cpp
# src/ship_cmd.cpp
# src/table/settings/gui_settings.ini
2 years ago
Tyler Trahan
ec90fb4c99
Fix #6544 : Don't join AI company when loading network game in singleplayer
2 years ago
Tyler Trahan
f4ca94d3f6
Codechange: Revenue is not the same as Income
...
Income is revenue minus costs. Let's name things correctly (without breaking the script API).
2 years ago
Rubidium
c73f578e8c
Codechange: replace magic numbers and C-style arrays with C++-style array for share owners
3 years ago
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
3 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
3 years ago
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
Jonathan G Rennison
62afd94b47
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/company_cmd.cpp
# src/economy.cpp
# src/lang/swedish.txt
# src/network/network_command.cpp
# src/news_gui.cpp
# src/saveload/saveload.h
# src/script/api/script_list.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/sdl2_v.cpp
3 years ago
Jonathan G Rennison
61cc60099a
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/network/core/packet.cpp
# src/network/core/udp.cpp
3 years ago
Jonathan G Rennison
28fd549808
Decline company takeover offer on company's behalf if company has no client
3 years ago
Jonathan G Rennison
296987153b
Add console command to offer a company for sale
3 years ago
Jonathan G Rennison
ec8512e2ea
When declining to buy a company, ask the next company immediately
3 years ago
Jonathan G Rennison
4042480806
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/table/win32_settings.ini
# src/table/window_settings.ini
3 years ago
Jonathan G Rennison
24fdc8331b
Add CheckCaches mode to emit a log/save/screenshot on detected issue
3 years ago
Jonathan G Rennison
5ed7aee8d3
Add flags field to CheckCaches for which checks to run
...
Add header file for CheckCaches
3 years ago
Jonathan G Rennison
fd605e3cf3
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/company_cmd.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/indonesian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/swedish.txt
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/mcf.cpp
# src/network/core/tcp.cpp
# src/network/core/tcp.h
# src/network/core/tcp_game.h
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_admin.cpp
# src/network/network_admin.h
# src/network/network_chat_gui.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf.cpp
# src/newgrf_station.cpp
# src/order_gui.cpp
# src/rail_cmd.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/station_cmd.cpp
# src/stdafx.h
# src/table/currency_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/terraform_cmd.cpp
# src/timetable_gui.cpp
# src/train_cmd.cpp
# src/tree_cmd.cpp
# src/water_cmd.cpp
3 years ago
rubidium42
9a7750f14e
Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function
3 years ago
rubidium42
aa9818db90
Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete
3 years ago
Patric Stout
5b50ae72f8
Fix #9348 , 4d74e51: don't try to sell shares of spectators ( #9349 )
...
"new_owner" can be INVALID_OWNER, and as INVALID_OWNER ==
COMPANY_SPECTATORS, we could end up trying to sell shares of
nobody.
(cherry picked from commit ef25afd55a
)
3 years ago
Patric Stout
ef25afd55a
Fix #9348 , 4d74e51: don't try to sell shares of spectators ( #9349 )
...
"new_owner" can be INVALID_OWNER, and as INVALID_OWNER ==
COMPANY_SPECTATORS, we could end up trying to sell shares of
nobody.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
rubidium42
661728558e
Codechange: let IsUnique.* functions accept std::string
3 years ago
rubidium42
ae85af98eb
Codechange: Use std::string GetString where convenient
3 years ago
rubidium42
297d6e20bf
Codechange: [Network] Pass passwords as std::string to the network code
3 years ago
rubidium42
c73d64adf9
Codechange: move passwords in settings to std::string
3 years ago
Jonathan G Rennison
8eb27e1ac7
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/lang/japanese.txt
# src/network/core/config.h
# src/network/core/packet.cpp
# src/network/core/tcp.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/toolbar_gui.cpp
# src/vehicle_gui_base.h
3 years ago
Patric Stout
ff708c2c65
Add: admin menu for companies in multiplayer games
...
You can now easily do:
- a password reset (unlock)
- remove an empty company (reset company)
3 years ago
Patric Stout
5266359424
Feature: rework in-game Online Players GUI
...
The GUI now more clearly shows some basic information about the
server you joined, your client name (and the ability to change it),
and what players are in which company.
It also contains useful buttons to press to join companies, chat
with other people, and for admins to kick/ban people.
Additionally, renamed "advertised" to "visibility"; this has to
do with future additions, but also because it is more clear in
wording.
3 years ago
Jonathan G Rennison
5e14b54a0c
Merge branch 'master' into jgrpp
4 years ago
dP
56911a86ea
Add: Buttons to open global goals from company goals and vice versa
4 years ago
Jonathan G Rennison
84a7ab180e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/lang/greek.txt
# src/table/settings.ini
4 years ago
Patric Stout
729df75d3e
Fix: [Network] don't desync if client leaves before you finish downloading map
...
When you are downloading a map, all the commands are queued up
for you. Clients joining/leaving is done by the network protocol,
and as such are processed immediately. This means that by the
time you are processing the commands, a client that triggered
it, might already have left.
So, all commands that do something with ClientID, shouldn't
error on an invalid ClientID when DC_EXEC is set, but
gracefully handle the command anyway, to make sure the
game-state is kept in sync with all the clients that did
execute the DoCommand while the now-gone client was still
there.
Additionally, in the small chance a client disconnects between
the server validating a DoCommand and the command being
executed, also just process the command as if the client was
still there. Otherwise, lag or latency can cause clients that
did not receive the disconnect yet to desync.
(cherry picked from commit 2d9062bfc1
)
4 years ago
Patric Stout
40505e645a
Fix: terraform limit acted random when maxing out per_64k_frames setting
...
uint32 + uint32 can overflow, so cast it to uint64 first.
4 years ago
Patric Stout
25e5a92286
Fix 9b800a96: (a << 16) is unsigned, so don't remove the cast
4 years ago