mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Introduce peep flags for static positions and animations
This commit is contained in:
parent
fb4c1451e4
commit
ed6bde7d56
5 changed files with 21 additions and 2 deletions
4
distribution/openrct2.d.ts
vendored
4
distribution/openrct2.d.ts
vendored
|
@ -2743,7 +2743,9 @@ declare global {
|
|||
"joy" |
|
||||
"angry" |
|
||||
"iceCream" |
|
||||
"hereWeAre";
|
||||
"hereWeAre" |
|
||||
"positionFrozen" |
|
||||
"animationFrozen";
|
||||
|
||||
/**
|
||||
* @deprecated since version 34, use EntityType instead.
|
||||
|
|
|
@ -979,7 +979,10 @@ void Guest::Tick128UpdateGuest(uint32_t index)
|
|||
}
|
||||
}
|
||||
|
||||
UpdateSpriteType();
|
||||
if (!(PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN))
|
||||
{
|
||||
UpdateSpriteType();
|
||||
}
|
||||
|
||||
if (State == PeepState::OnRide || State == PeepState::EnteringRide)
|
||||
{
|
||||
|
@ -1009,6 +1012,11 @@ void Guest::Tick128UpdateGuest(uint32_t index)
|
|||
}
|
||||
}
|
||||
|
||||
if (PeepFlags & PEEP_FLAGS_POSITION_FROZEN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (State == PeepState::Walking && !OutsideOfPark && !(PeepFlags & PEEP_FLAGS_LEAVING_PARK) && GuestNumRides == 0
|
||||
&& GuestHeadingToRideId.IsNull())
|
||||
{
|
||||
|
|
|
@ -956,6 +956,11 @@ static void GuestUpdateThoughts(Guest* peep)
|
|||
*/
|
||||
void Peep::Update()
|
||||
{
|
||||
if (PeepFlags & PEEP_FLAGS_POSITION_FROZEN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto* guest = As<Guest>();
|
||||
if (guest != nullptr)
|
||||
{
|
||||
|
|
|
@ -227,6 +227,8 @@ enum PeepFlags : uint32_t
|
|||
PEEP_FLAGS_INTAMIN_DEPRECATED = (1 << 27), // Used to make the peep think "I'm so excited - It's an Intamin ride!" while
|
||||
// riding on a Intamin ride.
|
||||
PEEP_FLAGS_HERE_WE_ARE = (1 << 28), // Makes the peep think "...and here we are on X!" while riding a ride
|
||||
PEEP_FLAGS_POSITION_FROZEN = (1 << 29), // Prevents the peep from moving around, thus keeping them in place
|
||||
PEEP_FLAGS_ANIMATION_FROZEN = (1 << 30), // Prevents the peep sprite from updating
|
||||
PEEP_FLAGS_TWITCH_DEPRECATED = (1u << 31), // Formerly used for twitch integration
|
||||
};
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace OpenRCT2::Scripting
|
|||
{ "angry", PEEP_FLAGS_ANGRY },
|
||||
{ "iceCream", PEEP_FLAGS_ICE_CREAM },
|
||||
{ "hereWeAre", PEEP_FLAGS_HERE_WE_ARE },
|
||||
{ "positionFrozen", PEEP_FLAGS_POSITION_FROZEN },
|
||||
{ "animationFrozen", PEEP_FLAGS_ANIMATION_FROZEN },
|
||||
});
|
||||
|
||||
class ScPeep : public ScEntity
|
||||
|
|
Loading…
Reference in a new issue