fix invalid polymodels if words_need_alignment=1

If compiled with words_need_alignment=1, the
model data was correctly converted and expanded,
but the old size was still used for validating
and initializing the model.

This caused funky effects on affected platforms,
e.g. some robots missing their heads on Raspberry Pi.
This commit is contained in:
Martin Fiedler 2020-07-02 21:56:11 +02:00
parent 1ce5054fc0
commit 60edaa7dce

View file

@ -766,9 +766,9 @@ void polygon_model_data_read(polymodel *pm, PHYSFS_File *fp)
if (words_bigendian)
swap_polygon_model_data(pm->model_data.get());
#if defined(DXX_BUILD_DESCENT_I)
g3_validate_polygon_model(pm->model_data.get(), model_data_size);
g3_validate_polygon_model(pm->model_data.get(), pm->model_data_size);
#elif defined(DXX_BUILD_DESCENT_II)
g3_init_polygon_model(pm->model_data.get(), model_data_size);
g3_init_polygon_model(pm->model_data.get(), pm->model_data_size);
#endif
}
}