Commit Graph

273 Commits

Author SHA1 Message Date
Duncan b29be9bfeb Merge pull request #4527 from zaxcav/fixPathfindHistory
Further pathfinding improvements
2016-10-07 12:08:36 +01:00
Michał Janiszewski 9966052ca7 Fix more configurations 2016-10-06 23:32:10 +02:00
Michał Janiszewski 71d0861be1 Mark classes as final
This may hint compiler to de-virtualise some calls.
2016-10-04 18:14:29 +01:00
zaxcav d447223535 Increase network version for pathfinding updates. 2016-10-04 12:32:06 +02:00
Ted John 8932707018 Don't show read groups.json error when it doesn't exist 2016-10-02 13:38:22 +01:00
Ted John 22c7cd4179 Improve bad error messages in multiplayer window
Set the title and text in the multiplayer commands to make sure it doesn't show an error box with the wrong text.
2016-10-02 12:28:28 +01:00
Michał Janiszewski 6a86f007f3 Fix #4437: Crash in Network::Server_Handle_AUTH 2016-09-19 19:25:00 +01:00
Marijn van der Werf 487d6d8f15 Remove unnecessary addresses.h imports 2016-09-17 20:59:55 +01:00
zsilencer dfc100f15e Fix issue with kick message not being received 2016-09-14 15:48:15 -06:00
LRFLEW e1b6319bc1 Fix Warnings in Xcode about Copy Elision 2016-09-13 18:07:40 -05:00
Ted John b8e4f71ab1 Fix #4422: Save overwrite multiplayer
Make sure we reset gFirstTimeSave when we join a new game or exit to title screen.
2016-09-13 23:53:46 +01:00
Ted John 5e352a9dfe Remove usage of List from Twitch.cpp 2016-09-13 18:27:57 +01:00
Manuel Vögele 73b7f3c9f4 Fix corrupted tcp stream when pinging while sending packets
Don't push network packets to the front of the queue if the frist packet is only partially transmitted. They are now inserted at the second
position instead.
2016-09-12 23:59:22 +01:00
Ted John ef7cd793a4 x64: Fix game_command_modify_groups 2016-09-10 18:35:12 +01:00
Ted John 91eb33255b Remove Exception::GetMsg()
We can undef any macro windows.h defines and interferes with our code base. In this case GetMessage
2016-09-08 21:37:27 +01:00
Michał Janiszewski 163e314379 Remove unused or set-but-not-read variables 2016-09-07 13:39:29 +01:00
Ted John bf16890489 Use util_rand as there is no srand for rand to work 2016-09-04 20:22:27 +01:00
Ted John 8bc69b549f Set advertiser to null after deletion 2016-09-04 11:17:15 +01:00
Michał Janiszewski f8145b6edc Refactor inclusion of addresses.h
addresses.h is now only included when necessary, limiting scope as much
as possible.
2016-09-03 21:25:19 +01:00
Ted John 5e30390f4a Set user agent for HTTP requests 2016-08-29 19:25:53 +01:00
Ted John d73c2ba13c Wire up new advertiser class 2016-08-29 15:35:46 +01:00
Ted John a346d8a048 Add NetworkServerAdvertiser class 2016-08-29 15:35:46 +01:00
Ted John 6266e77fd5 Add tag to http request / response 2016-08-29 15:35:45 +01:00
Ted John 8cf7e87b5c Fix many warnings for x64 2016-08-27 23:32:15 +01:00
Michael Steenbeek 5ff0db3caa Increment version number, (hopefully) fixes #4331 2016-08-24 17:26:11 +02:00
Tom Delebo 50348e015e Changed the server greeting buffer from 256 to 1024
* Changed the server greeting buffer size to accept longer strings
* Added comment explaining character limit for greeting buffer
* Moved chat constants to header file to allow access from includes
2016-08-20 23:20:53 +01:00
Ted John b3a06106a8 Merge pull request #4279 from delebota/mp_greeting
Add a server greeting which is displayed to connecting user
2016-08-17 23:18:08 +01:00
Ted John 560957824a Fix #4295: Game crash if the syntax of users.json file is wong
JsonException was not being caught in NetworkUser::Load().
2016-08-16 21:25:00 +01:00
Thomas Delebo 51eac62636 #4279 Truncate greeting so we don't overflow buffer 2016-08-15 12:08:23 -05:00
delebota e806a88d71 #4193 Add a server greeting which is displayed to connecting user 2016-08-13 23:15:45 -05:00
Yaroslav Tretyakov c967114463 Fix #4215: Multiplayer, default group does not work correctly with group IDs 2016-08-08 09:01:52 +01:00
Michał Janiszewski e930a09f0b Free compressed map when failed to connect client 2016-08-03 07:39:55 +02:00
zsilencer 5d04e5e03e Multiplayer desync stuff 2016-08-01 20:47:21 +02:00
Michał Janiszewski 155bc054df Fix #4172: Expose ride-type changing capability in UI
This also allows changing ride type in multiplayer games. Very crashy.
2016-08-01 20:30:08 +02:00
Michał Janiszewski 84137738e3 Disconnect client in case map sending fails 2016-07-30 10:13:08 +02:00
Michał Janiszewski 64c0c594dc Check if memory was allocated successfully for server map
Somehow, there are cases where server thinks a map is around 2GiB in
size. Such allocation will most likely fail on 32-bit system and crash
the server. This provides *some* safety check and at least prevents
server from crashing in such cases.
2016-07-30 10:13:08 +02:00
Michał Janiszewski 04fb336d1f Fix typo in comment 2016-07-27 15:09:30 +02:00
Michał Janiszewski 1fe5fc56c0 Checksum sprites occasionally in multiplayer
This creates a checksum (SHA1) every so often on server and sends this
value together with PRNG seed for client to check it has still not
desynced.

It's useful to detect a desync early on, as PRNG seeds may remain
unchanged for some more time, while damage may have already been caused.
2016-07-27 15:54:02 +02:00
Michał Janiszewski 82d52b63e6 Verify NetworkActions access 2016-07-26 15:07:33 +01:00
Yaroslav Tretyakov 3116ec3e76 Fix issue in ReceiveData 2016-07-24 21:01:14 +01:00
Ted John e5722e1d9a Fix #4139: Windows first time firewall launch
std::string can not handle nullptr as argument. Create and use helper method instead.
2016-07-19 21:53:18 +01:00
Michał Janiszewski 836450cab4 Fix declarations of network-less builds 2016-07-14 14:11:50 +02:00
Michał Janiszewski a6d0e6916e Fix function definitions to match their declarations
This makes sure every function is properly declared, which includes
proper `extern` wrappers.
2016-07-14 14:11:49 +02:00
Marijn van der Werf 5204fb0ce9 Clean up string and sprite ID's (#3977) 2016-07-14 14:07:49 +02:00
Michał Janiszewski f3786b3130 Fix #3899: Game crashes after hosting my server
Catch exceptions when loading groups.json.
2016-07-04 17:50:09 +01:00
Michał Janiszewski 9041551b97 Guard server against null signature 2016-06-23 20:09:56 +01:00
Michał Janiszewski 644a36a310 Fixes to -Wall compilation
By default, not all warnings are enabled. This change makes sure that
the project compiles correctly with following options turned on:

    -Wall -Wno-unused-but-set-variable -Wno-missing-braces \
    -Wno-unknown-pragmas -Wno-unused-function
2016-06-20 13:46:27 +01:00
Marijn van der Werf 42ee299f65 Replace references to OS X 2016-06-13 19:49:06 +02:00
Yaroslav Tretyakov 379b85f94c send fix #3836 (#3850) 2016-06-09 23:04:02 +01:00
Ted John 1761907f57 handle bad map data and close connection 2016-06-09 18:37:12 +01:00