Commit Graph

74 Commits

Author SHA1 Message Date
Matt 52ee9c6896
Use enum class for ExpenditureType 2019-12-22 20:51:55 +01:00
Duncan 3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
Matt fbe0506ca8
Add game action type to the assert in GameActions::ProcessQueue 2019-10-31 17:27:55 +01:00
Matt 0c11bbd4e7
Fix #9994: Game action tick collision during server connect and map load 2019-10-05 13:09:21 +02:00
Matt d6d480a31b
Fix desyncs because of GameActions ignoring the tick on client 2019-08-23 23:06:27 +02:00
Matt 769ed255f3
Refactor game action queue out of network into GameActions 2019-08-21 00:15:39 +02:00
Matt 8ab0ca4f8f
Fix DataSerialiser returning the wrong stream object 2019-07-27 16:06:26 +02:00
aw20368 8c20b635bd Fix #9270: Refactor money effect
Changed static functions to rct_money_effect member functions. GetStringId now returns std::pair.
2019-05-21 21:22:47 +02:00
Filip Gawin 6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
ζeh Matt 181a722c3b Fix game action errors not showing if no round trip was done (#9175) 2019-05-01 22:53:10 +02:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
duncanspumpkin 356a0e5e91 Rework flags 2019-04-04 19:23:44 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt 2090cbefae Fix #8851: Show only game action errors to the issuer. 2019-03-15 21:27:51 +01:00
Matt 6350a3b0b4 Fix nested query not working in paused game state. 2019-03-01 08:26:03 +01:00
Matt 92d73e2fab Set last player position based on game action result. 2019-02-21 15:51:00 +01:00
Matt a6c6d6ddc3 Update checks for when money is required. 2019-02-18 17:19:44 +01:00
Matt 21e4c52853 Use finance_check_affordability instead of CheckActionAffordability 2019-02-18 17:19:44 +01:00
Matt 2d78eace05 Use QueryInternal in ExecuteInternal. 2019-02-17 10:12:02 +01:00
Matt 00be865ff1 Use ExecuteNested/QueryNested instead of passing a parameter. 2019-02-15 16:32:11 +01:00
Matt caa490642c Refactor GameActions to allow non-top level actions. 2019-02-15 08:43:05 +01:00
Matt ee00143f3a Throw assert only in debug builds for missing game actions. 2019-02-07 18:23:58 +01:00
Matt c7ab757a86 Cleanup. 2018-12-29 23:06:15 +01:00
Matt 14695e9b41 Fix game actions with ghost flags being recorded to replays. 2018-12-29 19:23:28 +01:00
Matt 5a8b611b83 Update. 2018-12-29 19:23:28 +01:00
Matt df0cc72887 Add normalisation support to remove gaps. 2018-12-29 19:23:27 +01:00
Matt bf8108c2d6 Lock game actions and commands to replay commands if replay is active. 2018-12-29 19:23:27 +01:00
Matt a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00
Matt 4ff2dbd108 Automatically expose game action name via macro. 2018-12-20 22:20:58 +01:00
ζeh Matt d88a9048f9 Fix #8431: crash when game action logging is enabled. (#8447) 2018-12-15 18:41:55 +00:00
ζeh Matt 2da01caa1e Fix #8338: GAs using player id instead of index to log money spent. (#8361) 2018-12-05 07:39:57 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
ζeh Matt 1abb31a159 Implement game action logging. (#8138) 2018-11-20 06:04:42 +01:00
ζeh Matt 7831208f42 Fix #8199: Crash using player id as index. (#8210) 2018-11-02 22:48:45 +01:00
Sijmen Schoon f3f4776afd Properly fix maze building when paused (#7852)
Also fixes two relevant bugs:
- The error message having no title
- Fixes the controls in the construction window activating when the initial placement fails because of e.g. the game being paused.
2018-08-04 14:30:13 +02:00
clang-format 90f1a328ab clang-format game actions 2018-07-23 15:58:01 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Hielke Morsink 6c65c3d64d
Merge pull request #6774 from janisozaur/fixes
Various code improvements
2018-05-15 14:38:43 +02:00
Hielke Morsink 9f0d820b7c Use TileCoordsXYZD for wall locations 2018-05-14 12:36:45 +02:00
Hielke Morsink f9dd981234 Further fixes
- Use `= 0` for initializing types
- Add default values to some structs, instead of zero-initializing their instances with `{}`
- Use `std::make_unique` in Network.cpp
- Remove trivial constructors and destructors
- Improve readability of expression in Vehicle.cpp
2018-05-12 16:58:08 +02:00
Michał Janiszewski 0a92e74ced Minor fixes 2018-05-11 15:38:30 +02:00
ZehMatt 70ee22bbfa Discard empty errors. 2018-05-11 12:32:16 +02:00
Hielke Morsink 8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
Ted John 0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Hielke Morsink 8fac2e1480 Add guard to ensure game action is registered
This also reorders the headers, which caused RideDemolishAction to fail compiling, but that's also solved by adding the namespace before the call.
2018-01-29 13:22:13 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Gymnasiast 1626f86acc Compile park.c as C++ 2018-01-01 01:18:12 +01:00