From c6d548cc36d05ec64e7cae33f16da699a1ec3a8e Mon Sep 17 00:00:00 2001 From: Jeroen D Stout Date: Wed, 11 Oct 2017 18:17:40 +0200 Subject: [PATCH] Increase bouding box z of peeps --- src/openrct2/paint/sprite/peep.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/openrct2/paint/sprite/peep.c b/src/openrct2/paint/sprite/peep.c index 877fd57178..80c4739004 100644 --- a/src/openrct2/paint/sprite/peep.c +++ b/src/openrct2/paint/sprite/peep.c @@ -77,26 +77,28 @@ void peep_paint(paint_session * session, rct_peep * peep, sint32 imageDirection) spriteType = peep->next_action_sprite_type; imageOffset = 0; } - + + // In the following 4 calls to sub_98197C/sub_98199C, we add 5 (instead of 3) to the + // bound_box_offset_z to make sure peeps are drawn on top of railways uint32 baseImageId = (imageDirection >> 3) + sprite.sprite_animation[spriteType].base_image + imageOffset * 4; uint32 imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; - sub_98197C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); + sub_98197C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5, get_current_rotation()); if (baseImageId >= 10717 && baseImageId < 10749) { imageId = (baseImageId + 32) | peep->hat_colour << 19 | IMAGE_TYPE_REMAP; - sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); + sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5, get_current_rotation()); return; } if (baseImageId >= 10781 && baseImageId < 10813) { imageId = (baseImageId + 32) | peep->balloon_colour << 19 | IMAGE_TYPE_REMAP; - sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); + sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5, get_current_rotation()); return; } if (baseImageId >= 11197 && baseImageId < 11229) { imageId = (baseImageId + 32) | peep->umbrella_colour << 19 | IMAGE_TYPE_REMAP; - sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); + sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5, get_current_rotation()); return; } }