Commit Graph
629 Commits
Author SHA1 Message Date
zsilencer e2e4201112 Validate peep game command which caused crash from invalid sprite index 2016-10-22 01:53:33 -06:00
Duncan 81bb6cb950 Merge pull request #4649 from zsilencer/multiplayer
Guest+staff pickup and balloon pop commands
2016-10-20 12:46:27 +01:00
Duncan a572ecf477 Merge pull request #4576 from zaxcav/fixPathFind
Pathfinding checks all map elements on each tile.
2016-10-20 12:42:48 +01:00
zaxcav b85e53e898 Replace hex number with decimal number per PR review comments. 2016-10-20 11:08:14 +02:00
zaxcav 989a8fc4bc Update comment with new limits of ride satisfaction following commit 7f58c89. 2016-10-20 11:06:56 +02:00
zaxcav d36c756ee7 Spelling corrections in code comments. 2016-10-20 11:06:56 +02:00
zaxcav 68f89c6b07 Comment peep update code related to updating happiness, etc. 2016-10-20 11:03:54 +02:00
zaxcav 6011429630 Fix potential under/over-flow of happiness, hunger, thirst in peep generation. 2016-10-20 10:45:15 +02:00
zaxcav dfd27efaba Correct condition on running out of money thought. 2016-10-20 10:45:15 +02:00
zsilencer 3617c2cb93 Code review 2016-10-19 16:20:13 -06:00
zsilencer 986c2ab97e Fix bug - prevent firing of staff while being picked up 2016-10-19 16:20:05 -06:00
duncanspumpkin 8b196234e9 Flip the calcs 2016-10-19 21:30:08 +01:00
duncanspumpkin 430d1c4bcd Re-refactor peep calculate satisfaction 2016-10-18 21:53:01 +01:00
zsilencer 541ae91d67 fix pickup commands to work with hiring staff 2016-10-18 13:40:50 -06:00
zsilencer d74efb23fe Add picking up peeps/staff as game command 2016-10-18 13:40:49 -06:00
zaxcav 8741a40674 Remove hacks for pathfinding to the ride exit.
When sending a mechanic to a ride exit/entrance, the original pathfinding was setting the goal to the path next to the exit/entrance with goal.z set to the exit/entrance height. This is wrong when the path slopes up to the exit/entrance. Consequently the original pathfinding included a hack to allow the mechanic to enter the exit/entrance from the goal tile.

The changes in PR #4527 (commit f3cf23f) will ignore the relevant tile when the height is wrong, preventing the original hack from working. To fix this the height of paths sloping up was adjusted in the heuristic search ... which inadvertently broke pathfinding for other goals on such a sloped path (such as the start of a ride queue that slopes up).

To fix, set the goal to the ride exit/entrance itself, make the heuristic search aware of ride exits (code existed but was commented out; entrances are already there for rides without queues) and remove both the original hack and the (incorrect) heigh adjustment made in PR #4527.

Fixes issues #4626, #4629.
2016-10-17 09:31:28 +02:00
Ted John 00e907d007 Merge pull request #4414 from Broxzier/extended_tile_inspector
Extended tile inspector
2016-10-16 21:12:21 +01:00
Manuel Vögele ec8d37eead Fix #1943: Placing Handyman/Security Guard/Mechanic In Multiplayer Causes Crash
Open staff window on multiplayer clients when hiring new staff instead of a random visitor.
2016-10-13 22:02:10 +01:00
Michał Janiszewski f1cbb7935d Fix left shifts that may overflow 2016-10-13 19:48:42 +01:00
zaxcav 7718300881 Correct mistakes in merging conflicts. 2016-10-12 16:17:36 +02:00
zaxcav 113c41b976 Moved declaration of rideIndex to before first use. 2016-10-12 15:57:55 +02:00
zaxcav e2b830f7b9 Pathfinding checks all map elements on each tile.
Use of zero clearance will no longer block the path finding when paths and other map elements are placed in the same tile at the same height.

Pathfinding recognises map elements for shops, so peeps can find shops again.

Pathfinding recognises the park entrance, so peeps can leave the park again.
2016-10-12 15:10:34 +02:00
Michał Janiszewski a80461da80 Fix #4553: crash due to accessing invalid sprite
Assertion gets hit when trying to get invalid sprite from
remove_peep_from_queue
2016-10-12 08:18:41 +01:00
Broxzier a68dc7afb8 Add fence and banner info to tile inspector
This commit also renamed a flag, and corrected the use of one. The
flags in question are WALL_SCENERY_BANNER, WALL_SCENERY_2_FLAG4, and
WALL_SCENERY_2_FLAG5.
2016-10-11 23:27:04 +02:00
Michał Janiszewski 1135238c34 Remove/hide newly unused variables 2016-10-09 22:43:08 +02:00
LRFLEW e5ff7412e4 Refactor/Improve String and Path Handling 2016-10-09 15:29:58 -05:00
Duncan b29be9bfeb Merge pull request #4527 from zaxcav/fixPathfindHistory
Further pathfinding improvements
2016-10-07 12:08:36 +01:00
zaxcav 62ed46d29b Simplify initialisation of pathfinding telemetry.
Code revised per review comments.
2016-10-07 12:32:09 +02:00
Michał Janiszewski c9b0d9e24d Initialise all variables flagged by -Wmaybe-uninitialized 2016-10-06 23:13:28 +02:00
Jonathan Haas 7a13fa6221 Fix #2042: Underflow in entertainer code when subtracting 200 from time_in_queue.
Adding myself to contributors + changelog.
2016-10-06 19:15:48 +02:00
zaxcav 72b4ff4ac8 Fix another typo 'uint' vs 'uint8'. 2016-10-04 12:12:21 +02:00
zaxcav 533d51489d Fix typo 'uint' vs 'uint8'. 2016-10-04 12:02:24 +02:00
zaxcav 2aaf0692f9 Remove unused text descriptions of enum. 2016-10-04 10:05:51 +02:00
zaxcav 7ff53057c8 Optimise pathfinding changes. 2016-10-04 10:05:51 +02:00
zaxcav c1b371b510 Pathfinding now only treats wide path tiles as continuing tiles (and therefore a valid search result) when the current path tile is also wide.
Wide tiles are consequently only traversed to reach thin path tiles when in an area of wide path tiles. This fixes peeps getting stuck when the path search limits are all further away from the destination than wide tiles.
2016-10-04 10:05:51 +02:00
zaxcav 9625a42d82 Collect search path telemetry in the pathfinding:
- Telemetry information collected includes: end location, steps taken, number of junctions walked through, the list of junctions walked through and the directions taken at each of those junctions.

- Telemetry collection is not optimised and currently has a negative performance impact.

Improve pathfinding debugging framework:

- Include collected telemetry information in the debugging messages.

- Enable debugging only for specific peeps - for guests, debugging is logged for tracked guest(s) only; for staff, debugging is logged for "Mechanic Debug" only.

- Debug messages need a DEBUG build with appropriate log levels enabled: used log levels are VERBOSE and INFO.
2016-10-04 10:05:51 +02:00
zaxcav fd66526351 Basic commenting of the staff path finding code. 2016-10-04 10:05:51 +02:00
zaxcav f3cf23f5d5 Ignore no-through paths that do not reach the goal in peep path finding.
Pathfinding previously picked whichever path got closest to the goal, also when that path is a dead end with no through way to the goal.

Adjust the heuristic score comparison to only consider map elements that have reached the goal and search paths that reach one of the search limits, ending on a path tile (i.e. the path continues, from which the goal may still be reachable).

Update peep->pathfind_history to only store thin junctions.
2016-10-04 10:05:51 +02:00
Michael Steenbeek 52e5506d9a Fix crashes in ride with more than 12 cars per train 2016-10-03 21:58:52 +01:00
Ted John 46cf298e6e Merge pull request #4510 from Gymnasiast/fix-4505
Clear angriness status when making guests happy, fixes #4505
2016-10-01 13:49:42 +01:00
Gymnasiast 6291e337dd More code style 2016-10-01 14:38:52 +02:00
Gymnasiast 03eb6c287c Code style fixes 2016-10-01 11:36:00 +02:00
Gymnasiast f2a30c4c44 Clear angriness status when making guests happy 2016-10-01 10:38:40 +02:00
zaxcav 269571edcc get_ride_queue_end() fails if any tile in the queue goes up towards the station entry.
In this situation the pathfinding goal is set to the station entry location rather than the queue end location.
2016-09-29 22:02:21 +02:00
Marijn van der Werf 487d6d8f15 Remove unnecessary addresses.h imports 2016-09-17 20:59:55 +01:00
Ted John 7cecdeba3f Integrate addresses from peep.c 2016-09-12 21:12:38 +01:00
Ted John 1511143ea9 Remove commented out RCT2_GLOBALs 2016-09-12 20:57:36 +01:00
Ted John 148e6c3cd1 Remove unused global in staff.c 2016-09-12 20:53:10 +01:00
Michał Janiszewski 84dc29b929 Make sure shifted value is unsigned 2016-09-11 21:20:48 +02:00
Ted John 7edcd11aa7 Integrate entertainer costumes 2016-09-11 00:40:51 +01:00