Skip to content

Commit

Permalink
Update the money effect even when the game is paused (OpenRCT2#21102)
Browse files Browse the repository at this point in the history
* Update the money effect even when the game is paused

* Update changelog.txt
  • Loading branch information
ZehMatt authored Dec 23, 2023
1 parent c15391f commit 2147b69
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Feature: [OpenMusic#50] Added Rock style 4 ride music.
- Change: [#20790] Default ride price set to free if park charges for entry.
- Change: [#20880] Restore removed default coaster colours.
- Change: [#21102] The money effect will now update even when the game is paused.
- Fix: [#12299] Placing ride entrances/exits ignores the Disable Clearance Checks cheat.
- Fix: [#13473] Guests complain that the default Circus price is too high.
- Fix: [#15293] TTF fonts don’t format correctly with OpenGL.
Expand Down
3 changes: 3 additions & 0 deletions src/openrct2/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ void GameState::Tick()
NetworkSendTick();
}

// Keep updating the money effect even when paused.
UpdateMoneyEffect();

// Update the animation list. Note this does not
// increment the map animation.
MapAnimationInvalidateAll();
Expand Down
5 changes: 5 additions & 0 deletions src/openrct2/entity/EntityRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ void UpdateAllMiscEntities()
Balloon, Duck>();
}

void UpdateMoneyEffect()
{
MiscUpdateAllTypes<MoneyEffect>();
}

// Performs a search to ensure that insert keeps next_in_quadrant in sprite_index order
static void EntitySpatialInsert(EntityBase* entity, const CoordsXY& newLoc)
{
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/entity/EntityRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ template<typename T> T* CreateEntityAt(const EntityId index)
void ResetAllEntities();
void ResetEntitySpatialIndices();
void UpdateAllMiscEntities();
void UpdateMoneyEffect();
void EntitySetCoordinates(const CoordsXYZ& entityPos, EntityBase* entity);
void EntityRemove(EntityBase* entity);
uint16_t RemoveFloatingEntities();
Expand Down

0 comments on commit 2147b69

Please sign in to comment.