mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #18257 from rik-smeets/improve-crossing-behaviour
Fix guests 'waiting' on extended railway crossings
This commit is contained in:
commit
def6b705cf
|
@ -5,6 +5,7 @@
|
||||||
- Fix: [#18064] Unable to dismiss notification messages.
|
- Fix: [#18064] Unable to dismiss notification messages.
|
||||||
- Fix: [#18122] Ghosts count towards “Great scenery!” guest thought.
|
- Fix: [#18122] Ghosts count towards “Great scenery!” guest thought.
|
||||||
- Fix: [#18134] Underground on-ride photo section partially clips through adjacent terrain edge.
|
- Fix: [#18134] Underground on-ride photo section partially clips through adjacent terrain edge.
|
||||||
|
- Fix: [#18257] Guests ‘waiting’ on extended railway crossings.
|
||||||
- Improved: [#18192, #18214] Tycoon Park has been added Extras tab, Competition scenarios have received their own section.
|
- Improved: [#18192, #18214] Tycoon Park has been added Extras tab, Competition scenarios have received their own section.
|
||||||
- Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats.
|
- Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats.
|
||||||
|
|
||||||
|
|
|
@ -5289,7 +5289,7 @@ void Guest::UpdateWalking()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PathIsBlockedByVehicle())
|
if (ShouldWaitForLevelCrossing())
|
||||||
{
|
{
|
||||||
// Wait for vehicle to pass
|
// Wait for vehicle to pass
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -321,9 +321,15 @@ bool Peep::CheckForPath()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Peep::PathIsBlockedByVehicle()
|
bool Peep::ShouldWaitForLevelCrossing()
|
||||||
{
|
{
|
||||||
auto curPos = TileCoordsXYZ(GetLocation());
|
auto curPos = TileCoordsXYZ(GetLocation());
|
||||||
|
if (FootpathIsBlockedByVehicle(curPos))
|
||||||
|
{
|
||||||
|
// If current position is blocked, try to get out of the way
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
auto dstPos = TileCoordsXYZ(CoordsXYZ{ GetDestination(), NextLoc.z });
|
auto dstPos = TileCoordsXYZ(CoordsXYZ{ GetDestination(), NextLoc.z });
|
||||||
if ((curPos.x != dstPos.x || curPos.y != dstPos.y) && FootpathIsBlockedByVehicle(dstPos))
|
if ((curPos.x != dstPos.x || curPos.y != dstPos.y) && FootpathIsBlockedByVehicle(dstPos))
|
||||||
{
|
{
|
||||||
|
|
|
@ -412,7 +412,7 @@ public: // Peep
|
||||||
// TODO: Make these private again when done refactoring
|
// TODO: Make these private again when done refactoring
|
||||||
public: // Peep
|
public: // Peep
|
||||||
[[nodiscard]] bool CheckForPath();
|
[[nodiscard]] bool CheckForPath();
|
||||||
bool PathIsBlockedByVehicle();
|
bool ShouldWaitForLevelCrossing();
|
||||||
bool IsOnLevelCrossing();
|
bool IsOnLevelCrossing();
|
||||||
void PerformNextAction(uint8_t& pathing_result);
|
void PerformNextAction(uint8_t& pathing_result);
|
||||||
void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result);
|
void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result);
|
||||||
|
|
|
@ -1338,7 +1338,7 @@ void Staff::UpdateHeadingToInspect()
|
||||||
if (!CheckForPath())
|
if (!CheckForPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath())
|
if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t pathingResult;
|
uint8_t pathingResult;
|
||||||
|
@ -1446,7 +1446,7 @@ void Staff::UpdateAnswering()
|
||||||
if (!CheckForPath())
|
if (!CheckForPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath())
|
if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t pathingResult;
|
uint8_t pathingResult;
|
||||||
|
@ -1781,7 +1781,7 @@ void Staff::UpdatePatrolling()
|
||||||
if (!CheckForPath())
|
if (!CheckForPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath())
|
if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t pathingResult;
|
uint8_t pathingResult;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
// This string specifies which version of network stream current build uses.
|
// This string specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "2"
|
#define NETWORK_STREAM_VERSION "3"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
static Peep* _pickup_peep = nullptr;
|
static Peep* _pickup_peep = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue