summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-05 18:06:48 +0100
committerPatric Stout <github@truebrain.nl>2021-01-05 21:56:24 +0100
commit62cdadb58207b28dfdf1ab4ceb46278c2561f079 (patch)
treed6e8308cf106daf372ad673d87169f075d3c3a86 /src/network/network_client.cpp
parentd6e15d4943936a89d275354ee59d0e3b7c6a2018 (diff)
downloadopenttd-62cdadb58207b28dfdf1ab4ceb46278c2561f079.tar.xz
Change: move "give money" from client-list to company window
This is a much better location for this button, as you send money from one company to another company, not from player to player. This is based on work done by JGRPP in: https://github.com/JGRennison/OpenTTD-patches/commit/f82054339124cc6b89c5f4f9dac2d9da62f0108b and surrounding commits, which took the work from estys: https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311 We did modify it to fix several bugs and clean up the code while here anyway. The callback was removed, as it meant a modified client could prevent anyone from seeing money was transfered. The message is now generated in the command itself, making that impossible.
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index e083e6c1a..343f71eb7 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -1000,11 +1000,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(Packet *p)
ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
break;
- /* For speaking to company or giving money, we need the company-name */
- case NETWORK_ACTION_GIVE_MONEY:
- if (!Company::IsValidID(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY;
- FALLTHROUGH;
-
+ /* For speaking to company, we need the company-name */
case NETWORK_ACTION_CHAT_COMPANY: {
StringID str = Company::IsValidID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
SetDParam(0, ci_to->client_playas);