always init extra_bitmap_num in load_exit_models

Commit cb2b844 and subsequent commits changed load_exit_models to only
call bm_free_extra_objbitmaps if EMULATING_D1. The variable
extra_bitmap_num is initialized as a side effect of
bm_free_extra_objbitmaps, so it wasn't initialized anymore if
not EMULATING_D1. This broke the exit sequence with the
D2 Mac Demo data and add-on missions with custom exit sequences.
This commit adds initialization of extra_bitmap_num if not EMULATING_D1
to fix the exit handling.
This commit is contained in:
Arne de Bruijn 2020-11-29 20:48:52 +01:00
parent caa29824b9
commit 1d55bc7746

View file

@ -694,6 +694,10 @@ int load_exit_models()
bm_free_extra_models(LevelSharedPolygonModelState);
bm_free_extra_objbitmaps();
}
else if (!Exit_bitmaps_loaded)
{
extra_bitmap_num = Num_bitmap_files;
}
// make sure there is enough space to load textures and models
if (!Exit_bitmaps_loaded && N_ObjBitmaps > ObjBitmaps.size() - 6)