From 09dbe4c96f7462dcca9a0918a544f3c6483750b7 Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 21 Aug 2013 22:27:34 +0000 Subject: [PATCH] - Fixed loading of vehicle faces (by silversurfer) o Vehicle faces after index 163 (heli) were not loaded git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6302 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tactical/Interface Utils.cpp b/Tactical/Interface Utils.cpp index 400fd31de..9333e2f1c 100644 --- a/Tactical/Interface Utils.cpp +++ b/Tactical/Interface Utils.cpp @@ -93,7 +93,9 @@ BOOLEAN LoadCarPortraitValues( void ) for( iCounter = 0; iCounter < NUM_PROFILES; iCounter++ ) { - if ( gProfilesVehicle[ iCounter ].ProfilId == iCounter ) + // silversurfer: fixed to make sure that we only create objects for vehicles that have a face defined + // otherwise CHECKF will fail and return FALSE breaking the for loop and ignoring any further vehicles + if ( gProfilesVehicle[ iCounter ].ProfilId == iCounter && gNewVehicle[ iCounter ].szIconFace[0] != 0 ) { VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; strcpy( VObjectDesc.ImageFile, gNewVehicle[ iCounter ].szIconFace );