1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00
Commit Graph

10399 Commits

Author SHA1 Message Date
zaxcav
11174af00b Increment network version for pathfinding fixes. 2016-12-02 11:00:57 +01:00
zaxcav
5ff6199ba1 Changes/additions to the pathfinding logging messages.
Refactored some code into functions for enabling/disabling pathfinding debugging for a specific peep.

Some new log messages for improved clarity when debugging pathfinding.

Added a #define to independently enable/disable pathfinding debugging to be friendly to others using debugging builds.
2016-12-02 10:55:40 +01:00
zaxcav
2f4c5c4a06 Reset pathfind_goal when choose direction fails.
Currently pathfinding falls back to aimless movement in this case.

Resetting the pathfind_goal (which in turn will cause the pathfind_history to be reset) makes the pathfinding try again afresh the next time around.

Potentially useful for adjusting to path changes by the player and recovering from a stuck position due to earlier bad pathfinding.
2016-12-02 10:49:15 +01:00
zaxcav
f0cf7c2763 Fix loop detection in heuristic search based on pathfind_history.
In the existing version, returning to a junction in the pathfind history is considered a loop.  This is not useful as it prevents the pathfinding from backtracking, which is what the pathfind_history is intended to allow.

Updated to consider it a loop only when returning to a junction with no more edges left to try.
2016-12-02 10:23:56 +01:00
zaxcav
dd89a32016 Reset pathfind_history[i].direction when all directions have been tried.
When choosing a direction at a junction in pathfind_history (with no untried directions) the existing path finding falls back to aimless movement.

This change makes the pathfinding try again.

Useful for adjusting to path changes by the player and recovering from a stuck position in a savegame due to earlier bad pathfinding.
2016-12-02 10:20:49 +01:00
zaxcav
b83ab8d6e7 Reset pathfind_history before the heuristic search function is called.
Now that the heuristic search uses the pathfind_history for loop detection it is important that when the pathfind_goal is reset the pathfind_history gets reset before calling the heuristic search.
2016-12-02 10:15:33 +01:00
zaxcav
afcf48080c When choosing a direction, repair pathfind_history[i].direction.
Remove directions that are not permitted by the path element(s) at that location.
2016-12-02 10:10:23 +01:00
zaxcav
307ebc38be Fix initialisation of junctions added to pathfind_history.
Fix initialisation of junctions added to pathfind_history.
2016-12-02 09:57:19 +01:00
zaxcav
c2d9c7a6d4 Make path finding aware of ALL path elements when choosing a direction.
This is applicable for overlaid paths placed with zero clearance.

Previously the pathfinding only used the first path element.

Notes:

1. Logic related to path slope still only uses the the first path element.  Overlaying path elements with the same base height but different slopes may cause pathfinding glitches.

2. The heuristic search already uses a similar approach - the inconsistency could have caused pathfinding glitches.
2016-12-02 09:50:39 +01:00
Ted John
4ccb50409b Add test configurations 2016-12-02 02:49:50 +00:00
Ted John
fab8dce9cc Move file listing to the bottom of openrct2.vcxproj 2016-12-02 01:00:57 +00:00
Ted John
91e19c7d48 Move a lot of the common properties to a shared props file 2016-12-02 00:59:52 +00:00
Ted John
a08af1a253 Get tests to build for Windows and VS 2016-12-02 00:34:14 +00:00
Michał Janiszewski
86a336dd3d Extend LanguagePack test with negative tests 2016-12-01 23:28:01 +01:00
Michał Janiszewski
a2d30ac405 Add multibyte LanguagePack test 2016-12-01 23:21:35 +01:00
Michał Janiszewski
e3a3cf375d Add LanguagePackTest 2016-12-01 23:04:10 +01:00
Michał Janiszewski
729934193c Improve tests' CMakeLists.txt 2016-12-01 16:03:27 +01:00
Michał Janiszewski
b0e5333ce6 Improve sawyercoding_test.cpp 2016-12-01 16:03:27 +01:00
Michał Janiszewski
cae3f776f3 Run tests on travis 2016-12-01 16:03:27 +01:00
Michał Janiszewski
f496fceb00 Download and compile our own gtest 2016-12-01 16:03:27 +01:00
Michał Janiszewski
be1028b20e Add CMakeLists.txt file for tests 2016-12-01 16:03:27 +01:00
Michał Janiszewski
fdcbd583e3 Add first test for sawyercoding 2016-12-01 16:03:27 +01:00
Michał Janiszewski
1ae2ca54f7 Sort includes 2016-12-01 16:03:16 +01:00
Marijn van der Werf
4bc346df2f Update Xcode project 2016-12-01 16:03:16 +01:00
Michał Janiszewski
37c9bbd513 Extract format_codes to its own file 2016-12-01 16:03:16 +01:00
LRFLEW
5c6e0b550b Update Xcode Project 2016-12-01 16:03:16 +01:00
Michał Janiszewski
afdc1457d5 Move font-related code out from language.cpp 2016-12-01 16:03:16 +01:00
Michał Janiszewski
54e622659d Extract common parts from rct2.h to common.h 2016-12-01 16:03:16 +01:00
Michał Janiszewski
e7254ca708 Fix call to realpath in posix.c 2016-12-01 14:33:23 +01:00
Marijn van der Werf
15a6575346 Update hooks to return CPU flags 2016-12-01 14:15:47 +01:00
Michał Janiszewski
4077e607b0 Merge pull request #4846 from janisozaur/include
Fix includes
2016-12-01 11:30:34 +01:00
Michał Janiszewski
f486a1d302 Return valid value from strlogicalcmp even if assert is hit 2016-12-01 10:58:19 +01:00
Michał Janiszewski
070e41e656 Fix Windows builds due to missing header 2016-12-01 10:18:00 +01:00
Michael Steenbeek
b95fd84ecc Add note about full implementation 2016-12-01 09:42:29 +01:00
Michał Janiszewski
ecec752dec Remove some unused headers 2016-12-01 09:20:56 +01:00
Michał Janiszewski
7eb008b546 Ensure includes are used when needed 2016-12-01 09:09:15 +01:00
duncanspumpkin
6c8e0cc536 Fix #4838. Prevent leaving ghosts with small scenery
Issue was caused by placing two ghost scenery items when using the scenery placement tool. The ghost clean up code would only remove the first ghost and leave the second ghost. Mistake caused when refactoring. Incorrect use of NOT and AND.
2016-11-30 19:09:45 +00:00
Michał Janiszewski
46fbac9564 Add .clang-format style file (#4836)
[ci skip]
2016-11-30 19:01:02 +01:00
Duncan
a9eb93ce88 Merge pull request #4809 from duncanspumpkin/refactor
Refactor place scenery
2016-11-29 21:50:30 +00:00
duncanspumpkin
3f194991a1 Remove redundant variable 2016-11-29 19:01:46 +00:00
duncanspumpkin
329c8b1f76 Fix motion simulator vehicle colours.
Due to a mistake during implementation the vehicle colour of the motion simulator was the wrong way around. The trim colour was applied to the body and vice versa. Issue noticed by reddit user.
2016-11-28 17:51:37 +00:00
Michał Janiszewski
29a4277709 Refactor sawyercoding 2016-11-28 09:59:01 +00:00
Michael Steenbeek
30c61345d8 Fix special cases for ride photos when looking up uniform price, fixes #933 2016-11-28 10:27:42 +01:00
OpenRCT2 git bot
fc666e707a Merge Localisation/master into OpenRCT2/develop. 2016-11-28 04:00:23 +00:00
Michał Janiszewski
8627f6c456 Move utf-related functions to utf8.c
This makes utf8.c standalone (not requiring any external symbols)
2016-11-27 23:25:59 +00:00
Michał Janiszewski
1658ba7109 Fix compilation of LightFX with GCC 2016-11-27 21:43:11 +00:00
Ted John
ee0ca426b3 Allow building for both VS2015 and VS2017 2016-11-26 23:53:29 +00:00
OpenRCT2 git bot
039d64e256 Merge Localisation/master into OpenRCT2/develop. 2016-11-26 04:00:22 +00:00
Krutonium
173303f30d Add PowerPC to list of architectures in version.h
PowerPC is not supported yet, but it's getting closer.
2016-11-24 13:10:10 +01:00
OpenRCT2 git bot
f03f718dd1 Merge Localisation/master into OpenRCT2/develop. 2016-11-24 04:00:18 +00:00