Don't draw objects with a modelnum of -1, improving stability when a third party mission is played with shareware data

This commit is contained in:
Chris Taylor 2012-07-24 17:42:51 +08:00
parent b9e16185a3
commit 4b44e08b6c
2 changed files with 4 additions and 0 deletions

View file

@ -5,6 +5,7 @@ D1X-Rebirth Changelog
main/bmread.c: No calling piggy_dump_all() when EDITOR is defined, it causes a failed Assert and causes it to exit when the PC Shareware descent.pig is used
English.lproj/InfoPlist.strings, d1x-Info.plist, d1x-rebirth.xcodeproj/project.pbxproj, d1xgl-Info.plist: Increment version number for Mac files (should have committed this ages ago)
include/strutil.h, main/collide.c, main/dumpmine.c, ui/gadget.c, ui/radio.c: Fix warnings (add d_splitpath prototype, no checking ubyte 'id' is < 0, fix say_totals prototype, include d_strdup prototype for radio.c and make sure that 'text' gets freed)
main/polyobj.c: Don't draw objects with a modelnum of -1, improving stability when a third party mission is played with shareware data
20120723
--------

View file

@ -507,6 +507,9 @@ void draw_polygon_model(vms_vector *pos,vms_matrix *orient,vms_angvec *anim_angl
polymodel *po;
int i;
if (model_num < 0)
return;
Assert(model_num < N_polygon_models);
po=&Polygon_models[model_num];