1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Merge pull request #4547 from HaasJona/entertainer_fix

Fix #2042: Underflow in entertainer code when subtracting 200 from time_in_queue.
This commit is contained in:
Duncan
2016-10-06 18:22:41 +01:00
committed by GitHub
3 changed files with 8 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ Includes all git commit authors. Aliases are GitHub user names.
* (marcovmun)
* Sven Slootweg (joepie91)
* Daniel Trujillo Viedma (gDanix)
* Jonathan Haas (HaasJona)
## Toolchain
* (Balletie) - macOS

View File

@@ -30,6 +30,7 @@
- Removed: BMP screenshots.
- Removed: Intamin and Phoenix easter eggs.
- Fix: [#1038] Guest List is out of order.
- Fix: [#2042] Guests entering queues are immediately annoyed when many entertainers are around (original bug).
- Fix: [#2081] Game hangs when track has infinite loop.
- Fix: [#2754] Dragging scrollview fails when scaled.
- Fix: [#3210] Scenery window scrolls too far.

View File

@@ -1240,7 +1240,12 @@ static void staff_entertainer_update_nearby_peeps(rct_peep* peep) {
peep->happiness_growth_rate = min(peep->happiness_growth_rate + 4, 255);
}
else if (peep->state == PEEP_STATE_QUEUING) {
peep->time_in_queue -= 200;
if(peep->time_in_queue > 200) {
peep->time_in_queue -= 200;
}
else {
peep->time_in_queue = 0;
}
peep->happiness_growth_rate = min(peep->happiness_growth_rate + 3, 255);
}
}