MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GuestTryGetUpFromSitting

Function GuestTryGetUpFromSitting

src/openrct2/entity/Guest.cpp:1264–1280  ·  view source on GitHub ↗

* * rct2: 0x00691677 */

Source from the content-addressed store, hash-verified

1262 * rct2: 0x00691677
1263 */
1264 static void GuestTryGetUpFromSitting(Guest& guest)
1265 {
1266 // Eats all food first
1267 if (guest.hasFoodOrDrink())
1268 return;
1269
1270 guest.TimeToSitdown--;
1271 if (guest.TimeToSitdown)
1272 return;
1273
1274 guest.SetState(PeepState::walking);
1275
1276 // Set destination to the centre of the tile.
1277 const auto destination = guest.getLocation().ToTileCentre();
1278 guest.SetDestination(destination, 5);
1279 guest.UpdateCurrentAnimationType();
1280 }
1281
1282 /**
1283 *

Callers 1

updateSittingMethod · 0.85

Calls 6

hasFoodOrDrinkMethod · 0.80
getLocationMethod · 0.80
SetDestinationMethod · 0.80
SetStateMethod · 0.45
ToTileCentreMethod · 0.45

Tested by

no test coverage detected