Skip to content

Commit

Permalink
fix load order from file
Browse files Browse the repository at this point in the history
  • Loading branch information
ZelionD committed Jan 21, 2025
1 parent a45a2f8 commit 58eebdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/building/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,14 @@ void building_state_load_from_buffer(buffer *buf, building *b, int building_buf_
b->storage_id = 0;
buffer_skip(buf, 1); // do not load storage_id for non-storage buildings
}
b->sentiment.house_happiness = buffer_read_i8(buf); // which union field we use does not matter
if (save_version >= SAVE_GAME_LAST_ADVANCED_SENTIMENT) {
if (building_is_house(b->type)) {
buffer_read_raw(buf, &b->house_adv_sentiment, sizeof(b->house_adv_sentiment));
} else {
buffer_skip(buf, sizeof(b->house_adv_sentiment));
}
}
b->sentiment.house_happiness = buffer_read_i8(buf); // which union field we use does not matter
b->show_on_problem_overlay = buffer_read_u8(buf);

// Wharves produce fish and don't need any progress
Expand Down

0 comments on commit 58eebdf

Please sign in to comment.