Commit Graph

58 Commits

Author SHA1 Message Date
Christian F. Coors 32da66aa79 Fix build errors 2017-07-25 22:50:19 +02:00
wolfreak99 47a89c4cf3 Add "Ignore research status" cheat 2017-07-23 12:09:29 +02:00
Keatzee ea87e87750 Fix #4301: Remove leading/trailing space from playername 2017-07-22 09:43:24 +01:00
rwjuk cc95aa0433 Fix visual corruption caused by zero sprite dimensions
Sprite corruption issue highlight

Fix already bugged saves

Fix visual corruption caused by zero sprite dimensions
2017-07-06 13:22:24 +01:00
Zeh Matt a8efd2cc4d Fix #5676: Last action issues
LastActionTime using server tick instead of real time platform ticks. (#5722)
2017-06-27 14:50:21 +01:00
Ted John b9e9ddfc1c Use more dependency injection 2017-06-24 09:56:51 +02:00
ZehM4tt 81572e9592 Fix game crashing/freezing when kicking players in MP. 2017-06-21 12:02:37 +02:00
ZehM4tt 10740106f2 Fix causing asserts with DEBUG_DESYNC and loading new maps. (#5650)
Moved input handling out of game_logic_update back to game_update,
should be executed per frame not tick.
Placed gInUpdateCode at the proper locations.
2017-06-19 17:41:28 +02:00
ZehM4tt efdac19f3b Extract game commands execution​ from within network_update. (#5642)
* Moved out command processing from network_update into its own function. This should fix some false positives calling scenario_rand from a command callback.

* Fix Server_Handle_GAMECMD to use the command queue instead of executing directly.

* Exit the queue processing to still check for desync
2017-06-18 08:03:37 +02:00
Michał Janiszewski 9903c15e2a Remove various trailing whitespaces
[ci skip]
2017-06-17 13:41:40 +02:00
ZehM4tt 5bb8dfb49c Remove queued game commands that would be impossible to execute.
Added a warning instead of assert for commands that are discarded.
2017-06-17 11:49:26 +02:00
ZehM4tt 4362314f70 Clarified the comment. 2017-06-17 11:49:26 +02:00
ZehM4tt ea59769cfd Fixes clients receiving commands before the map data is sent and loaded. 2017-06-17 11:49:26 +02:00
wolfreak99 67160d2f70 Rename sint32 gFirstTimeSave to bool gFirstTimeSaving 2017-06-14 16:28:11 +02:00
Michał Janiszewski 9d5a86d0ae Fix condition checks for being in logic update code (#5610) 2017-06-14 07:44:23 +01:00
Richard Jenkins 4c67ef1d6a Implement persistent 'real names of guests' setting 2017-06-12 14:05:19 +02:00
ZehM4tt 60bf5083fc Fixed few multiplayer desync issues. (#5578)
This addresses some of the desync causes:

* `vehicle_create_car` was using `scenario_rand` when it shouldn't have
* ghost elements affected grass growth
* ghost elements affecting peep logic[1]

It also adds some desync debug facilities, enabled at compile time.

It also reverts part of change introduced in
https://github.com/OpenRCT2/OpenRCT2/pull/5185,
namely reorder of desync check vs call to `ProcessGameCommandQueue();`

[1] It is not ideal to have this check in multiple locations, it is prone
to human error. We already have `map_remove_provisional_elements`,
but it is possible it does not work as well as it should. This needs
further investigation.
2017-06-12 12:11:01 +02:00
Ted John 3988b7797e Fix display of chat shortcut on network games (#5593) 2017-06-11 18:19:15 +01:00
Ted John dfa1b47a4f Move keyboard shortcut code to libopenrct2ui. 2017-06-11 16:52:15 +01:00
Ted John 0d8f9d6618 Refactor IPlatformEnvironment (#5590) 2017-06-11 12:53:37 +01:00
Jeremy Herbert ac99683955 Add cheat to disable ride value ageing 2017-06-07 21:52:47 +01:00
Michał Janiszewski 61d38511bc Expand tabs to spaces
This commit expands tabs to spaces (ts=4) in all the files under src/
and test/.

Until now we had two wildly different code styles with C using tabs and
new C++ using spaces. It is painful to maintain as none of the commonly
used tools support this kind of setup and in reality is needless, as we
can simply convert all the sources to spaces and have opened PRs do the
same, where needed.

Additionally, trailing whitespace has been removed.
2017-06-06 23:46:14 +02:00
Michał Janiszewski 43114b105c Extend logging with signs and track modifications 2017-06-06 23:17:46 +02:00
Ted John 8bb15a70de Refactor chat / server stream logging 2017-06-06 23:08:01 +02:00
delebota f69e7ac89e Setup server action logging for server admins in multiplayer
Squash commit containing:
- 398d978 Setup server action logging for server admins in multiplayer
- 13330ae Added server action logging for using cheats in multiplayer
- b619019 Added server action logging for demolishing rides in multiplayer
- 93de752 Added server action logging for editing ride properties in multiplayer
- 8a3d932 Added server action logging for editing park properties in multiplayer
- c78b6e7 Moved duplicate chat and server logging code into new network methods
- c8f66bf Changed logging variable types to avoid deprecated conversion errors in CI builds
- 454e527 Added improved server action logging for using cheats in multiplayer
- 1194305 Moved server action logging code in game.c into a separate method to reduce clutter
- d59cd42 Added server action logging for add/edit/remove scenery in multiplayer
- c41ae0e Added server action logging for clients in multiplayer
- c383341 Removed unused variable to fix CI build error
- 2d1d8e3 Added server action logging for ride creation in multiplayer
2017-06-06 23:07:54 +02:00
Ted John 1e9f9790ae Fix #5496: Attempting to log into servers results in crash
Caused by the user not having the required 'official' objects. This was because the network was being closed during a network update. Disposed memory would then be accessed later in the update loop.

To fix this, a lock has been added to Close() so that it can be deferred to the end of Update(). This isn't particularly nice, but the whole of network will need redesigning to fix this properly for all potentical scenarios where Close() can be called.
2017-06-06 20:05:47 +01:00
Leurak 112f7b7a0d Add address parameter in network_begin_server 2017-06-04 00:42:13 +01:00
Leurak c002df1abf Keep address parameter in BeginServer 2017-06-04 00:42:13 +01:00
Leurak 14c46a659c Add config option for socket listen address 2017-06-04 00:42:13 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Craig Craig 9dd820e2e7 Spelling fixes 2017-05-08 08:30:50 +02:00
Michał Janiszewski a25ce1e646 Make Network::server_connection dynamically instantiated 2017-05-05 16:54:44 +02:00
Ted John 73fb132e41 Replace some SDL functions with our own 2017-05-04 17:27:51 +01:00
wolfreak99 28c61e7068 Prepare scenario options sync 2017-04-11 14:26:25 +02:00
Tom Delebo e9c4365aa2 Add description and greeting textbox to server start menu 2017-04-06 14:31:36 +02:00
Michał Janiszewski 7341f4aadd Remove trailing whitespace
[ci skip]
2017-03-07 20:38:11 +01:00
wolfreak99 c6b5053261 Add cooldowns to help prevent mass demolishing 2017-02-28 09:31:26 +01:00
Ted John af7af61536 Merge pull request #5240 from IntelOrca/refactor/config-cpp-2
Refactor config
2017-02-25 01:35:03 +00:00
Michał Janiszewski f6f6d27b4f Make default "User" group not have "passwordless login" permission 2017-02-19 23:28:23 +01:00
Ted John a473740efd Fix build errors 2017-02-19 21:41:36 +00:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
wolfreak99 5bdf2cac75 Add permissions for MODIFY_TILE command 2017-02-12 23:02:59 +01:00
Christian Murphy b3e079c7fa Resolve #5140: Headless server saves default user.json 2017-02-09 18:51:49 +00:00
Ted John c379347d59 Use stream for chat log 2017-02-08 22:00:04 +00:00
Ted John d124f4fad0 Use streams for network load and save 2017-02-08 18:16:33 +00:00
Ted John de0e6bf521 Use IStream for network code 2017-02-08 12:53:00 +00:00
Ted John 2a11bc97fd Merge pull request #5179 from IntelOrca/refactor/sc-chunk-writer
Use streams for SV6 export
2017-02-08 12:01:38 +00:00
Yaroslav Tretyakov 546aace3dd Fix invalid desync checks
#5185
2017-02-07 12:04:41 +00:00
Ted John 2518362112 Use streams for SV6 export 2017-02-05 15:45:23 +00:00
Michał Janiszewski 6bd9e3eca8 Make sure various fields are initialised properly 2017-01-27 07:35:48 +01:00