mirror of https://github.com/OpenRCT2/OpenRCT2.git
Import more peep fields
This commit is contained in:
parent
5fa756fef4
commit
df2cd48c52
|
@ -742,7 +742,10 @@ private:
|
|||
rct_peep *peep = (rct_peep*)create_sprite(1);
|
||||
move_sprite_to_list((rct_sprite*)peep, SPRITE_LIST_PEEP * 2);
|
||||
|
||||
ImportPeep(peep, srcPeep);
|
||||
if (srcPeep->state != PEEP_STATE_ON_RIDE)
|
||||
{
|
||||
ImportPeep(peep, srcPeep);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -752,54 +755,84 @@ private:
|
|||
{
|
||||
dst->sprite_identifier = SPRITE_IDENTIFIER_PEEP;
|
||||
dst->sprite_type = PEEP_SPRITE_TYPE_NORMAL;
|
||||
dst->outside_of_park = 1;
|
||||
dst->state = PEEP_STATE_FALLING;
|
||||
dst->action = PEEP_ACTION_NONE_2;
|
||||
dst->special_sprite = 0;
|
||||
dst->action_sprite_image_offset = 0;
|
||||
dst->no_action_frame_no = 0;
|
||||
dst->action_sprite_type = 0;
|
||||
dst->peep_flags = 0;
|
||||
dst->favourite_ride = 0xFF;
|
||||
dst->favourite_ride_rating = 0;
|
||||
|
||||
const rct_sprite_bounds* spriteBounds = g_sprite_entries[dst->sprite_type].sprite_bounds;
|
||||
dst->sprite_width = spriteBounds[dst->action_sprite_type].sprite_width;
|
||||
dst->sprite_height_negative = spriteBounds[dst->action_sprite_type].sprite_height_negative;
|
||||
dst->sprite_height_positive = spriteBounds[dst->action_sprite_type].sprite_height_positive;
|
||||
|
||||
dst->sprite_direction = 0;
|
||||
|
||||
rct_xyz16 position = { src->x, src->y, src->z };
|
||||
|
||||
sprite_move(position.x, position.y, position.z, (rct_sprite*)dst);
|
||||
sprite_move(src->x, src->y, src->z, (rct_sprite*)dst);
|
||||
invalidate_sprite_2((rct_sprite*)dst);
|
||||
|
||||
dst->var_41 = (scenario_rand() & 0x1F) + 45;
|
||||
dst->var_C4 = 0;
|
||||
dst->var_79 = 0xFF;
|
||||
dst->sprite_direction = src->sprite_direction;
|
||||
|
||||
dst->name_string_idx = src->name_string_idx;
|
||||
|
||||
dst->outside_of_park = src->outside_of_park;
|
||||
dst->state = src->state;
|
||||
|
||||
dst->type = PEEP_TYPE_GUEST;
|
||||
dst->previous_ride = 0xFF;
|
||||
dst->thoughts->type = PEEP_THOUGHT_TYPE_NONE;
|
||||
|
||||
dst->tshirt_colour = RCT1::GetColour(src->tshirt_colour);
|
||||
dst->trousers_colour = RCT1::GetColour(src->trousers_colour);
|
||||
dst->destination_x = src->destination_x;
|
||||
dst->destination_y = src->destination_y;
|
||||
dst->destination_tolerence = src->destination_tolerence;
|
||||
|
||||
dst->energy = src->energy;
|
||||
dst->energy_growth_rate = src->energy_growth_rate;
|
||||
dst->happiness = src->happiness;
|
||||
dst->happiness_growth_rate = src->happiness_growth_rate;
|
||||
dst->nausea = src->nausea;
|
||||
dst->nausea_growth_rate = src->nausea_growth_rate;
|
||||
dst->hunger = src->hunger;
|
||||
dst->thirst = src->thirst;
|
||||
dst->bathroom = src->bathroom;
|
||||
dst->var_41 = src->var_41;
|
||||
|
||||
dst->intensity = src->intensity;
|
||||
dst->nausea_tolerance = src->nausea_tolerance;
|
||||
dst->window_invalidate_flags = 0;
|
||||
|
||||
dst->current_ride = src->current_ride;
|
||||
dst->current_ride_station = src->current_ride_station;
|
||||
|
||||
dst->var_79 = 0xFF;
|
||||
|
||||
dst->id = src->id;
|
||||
dst->cash_in_pocket = src->cash_in_pocket;
|
||||
dst->cash_spent = src->cash_spent;
|
||||
dst->time_in_park = -1;
|
||||
|
||||
dst->previous_ride = 0xFF;
|
||||
|
||||
dst->thoughts->type = PEEP_THOUGHT_TYPE_NONE;
|
||||
|
||||
dst->var_C4 = 0;
|
||||
dst->guest_heading_to_ride_id = src->guest_heading_to_ride_id;
|
||||
|
||||
dst->peep_flags = 0;
|
||||
dst->pathfind_goal.x = 0xFF;
|
||||
dst->pathfind_goal.y = 0xFF;
|
||||
dst->pathfind_goal.z = 0xFF;
|
||||
dst->pathfind_goal.direction = 0xFF;
|
||||
dst->guest_heading_to_ride_id = 0xFF;
|
||||
|
||||
dst->tshirt_colour = 12;
|
||||
dst->trousers_colour = 15;
|
||||
dst->favourite_ride = src->favourite_ride;
|
||||
dst->favourite_ride_rating = src->favourite_ride_rating;
|
||||
|
||||
uint8 energy = (scenario_rand() & 0x3F) + 65;
|
||||
dst->energy = energy;
|
||||
dst->energy_growth_rate = energy;
|
||||
dst->item_standard_flags = src->item_standard_flags;
|
||||
|
||||
peep_update_name_sort(dst);
|
||||
|
||||
gNumGuestsInPark++;
|
||||
if (!dst->outside_of_park)
|
||||
{
|
||||
gNumGuestsInPark++;
|
||||
}
|
||||
}
|
||||
|
||||
void ImportPeepSpawns()
|
||||
|
|
Loading…
Reference in New Issue