@@ -1189,11 +1189,9 @@ static void read_type_data(io_buffer *iob, building *b, size_t version) {
1189
1189
iob->bind____skip (26 );
1190
1190
iob->bind____skip (57 );
1191
1191
iob->bind (BIND_SIGNATURE_UINT8, &data.farm .worker_frame );
1192
- } else {
1192
+ } else if ( building_is_entertainment (b-> type )) {
1193
1193
iob->bind____skip (26 );
1194
- iob->bind____skip (56 );
1195
- iob->bind (BIND_SIGNATURE_UINT8, &data.guild .max_workers );
1196
- iob->bind____skip (1 );
1194
+ iob->bind____skip (58 );
1197
1195
iob->bind (BIND_SIGNATURE_UINT8, &data.entertainment .num_shows );
1198
1196
iob->bind (BIND_SIGNATURE_UINT8, &data.entertainment .juggler_visited );
1199
1197
iob->bind (BIND_SIGNATURE_UINT8, &data.entertainment .musician_visited );
@@ -1208,6 +1206,12 @@ static void read_type_data(io_buffer *iob, building *b, size_t version) {
1208
1206
iob->bind (BIND_SIGNATURE_UINT8, &data.entertainment .consume_material_id );
1209
1207
iob->bind (BIND_SIGNATURE_UINT8, &data.entertainment .spawned_entertainer_days );
1210
1208
iob->bind (BIND_SIGNATURE_UINT32, &data.entertainment .booth_corner_grid_offset );
1209
+ } else if (b->type == BUILDING_WARSHIP_WHARF) {
1210
+ iob->bind (BIND_SIGNATURE_UINT8, &data.wharf .orientation );
1211
+ } else {
1212
+ iob->bind____skip (26 );
1213
+ iob->bind____skip (56 );
1214
+ iob->bind (BIND_SIGNATURE_UINT8, &data.guild .max_workers );
1211
1215
}
1212
1216
}
1213
1217
@@ -1273,9 +1277,10 @@ io_buffer* iob_buildings = new io_buffer([](io_buffer* iob, size_t version) {
1273
1277
iob->bind (BIND_SIGNATURE_UINT8, &b->health_proof );
1274
1278
iob->bind (BIND_SIGNATURE_INT16, &b->formation_id );
1275
1279
1276
- read_type_data (iob, b, version); // 42 bytes for C3, 102 for PH
1280
+ read_type_data (iob, b, version); // 102 for PH
1277
1281
1278
1282
int currind = iob->get_offset () - sind;
1283
+ assert (currind > 0 );
1279
1284
iob->bind____skip (184 - currind);
1280
1285
1281
1286
iob->bind (BIND_SIGNATURE_INT32, &b->tax_income_or_storage );
0 commit comments