for flexibility in terms of modding, allow player ship textures in Multiplayer be <= N_PLAYER_SHIP_TEXTURES and not hit Assert but pull out Eroor if there are more

This commit is contained in:
zicodxx 2011-06-04 22:50:35 +02:00
parent 5d1cf695e2
commit 856ac49a7b
2 changed files with 3 additions and 1 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
main/lighting.c: Since set_dynamic_light() is not necessarily processed each frame, added own counter for delayed precession of vertex-clight calculation; Added possibility to page in a bitmap in case an object which has never been rendered before is supposed to cast light visible by the player
main/sounds.h, main/weapon.c: Fix weapon selection sounds fpr pc shareware and do not allow selecting weapons not available in this content (i.e. if obtained by cheat)
main/multi.c: for flexibility in terms of modding, allow player ship textures in Multiplayer be <= N_PLAYER_SHIP_TEXTURES and not hit Assert but pull out Eroor if there are more
20110601
--------

View file

@ -2245,7 +2245,8 @@ void multi_reset_object_texture (object *objp)
if (id == 0)
objp->rtype.pobj_info.alt_textures=0;
else {
Assert(N_PLAYER_SHIP_TEXTURES == Polygon_models[objp->rtype.pobj_info.model_num].n_textures);
if (N_PLAYER_SHIP_TEXTURES < Polygon_models[objp->rtype.pobj_info.model_num].n_textures)
Error("Too many player ship textures!\n");
for (i=0;i<N_PLAYER_SHIP_TEXTURES;i++)
multi_player_textures[id-1][i] = ObjBitmaps[ObjBitmapPtrs[Polygon_models[objp->rtype.pobj_info.model_num].first_texture+i]];