2019-10-14 13:49 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002164FSSCPtablespublic2010-12-09 14:55
ReporterFSF 
Assigned ToGenghis 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.12 RC1 
Target VersionFixed in Version3.6.13 
Summary0002164: Assert on missing muzzleflash
DescriptionWhen using a muzzleflash effect that is listed in mflash.tbl (or a -mfl.tbm), but the effect is not present in data\effects, FSO gives an assert. Suggest that it gives a normal "Warning: Effect not found: xxx" message.
Additional InformationThe attached .zip will make the Subach produce said error. For use solely with retail data, no MVPs.
TagsNo tags attached.
Attached Files
  • zip file icon mflash-tables.zip (553 bytes) 2010-03-27 03:54
  • diff file icon fix_2164.diff (1,156 bytes) 2010-03-28 21:04 -
    Index: code/weapon/muzzleflash.cpp
    ===================================================================
    --- code/weapon/muzzleflash.cpp	(revision 6028)
    +++ code/weapon/muzzleflash.cpp	(working copy)
    @@ -202,10 +202,20 @@
     			continue;
     
     		// blobs
    -		for ( idx = 0; idx < Mflash_info[i].blobs.size(); idx++) {
    +		int original_num_blobs = Mflash_info[i].blobs.size();
    +		int original_idx = 1;
    +		for ( idx = 0; idx < Mflash_info[i].blobs.size(); ) {
     			Mflash_info[i].blobs[idx].anim_id = bm_load_animation(Mflash_info[i].blobs[idx].name, &num_frames, &fps, NULL, 1);
    -			Assert( Mflash_info[i].blobs[idx].anim_id >= 0 );
    -			bm_page_in_xparent_texture( Mflash_info[i].blobs[idx].anim_id );
    +			if ( Mflash_info[i].blobs[idx].anim_id >= 0 ) {
    +				bm_page_in_xparent_texture( Mflash_info[i].blobs[idx].anim_id );
    +				++idx;
    +			}
    +			else {
    +				Warning(LOCATION, "Muzleflash \"%s\", blob [%d/%d]\nMuzzleflash blob \"%s\" not found!  Deleting.", 
    +					Mflash_info[i].name, original_idx, original_num_blobs, Mflash_info[i].blobs[idx].name);
    +				Mflash_info[i].blobs.erase( Mflash_info[i].blobs.begin() + idx );
    +			}
    +			++original_idx;
     		}
     	}
     }
    
    diff file icon fix_2164.diff (1,156 bytes) 2010-03-28 21:04 +

-Relationships
+Relationships

-Notes

~0011841

Genghis (developer)

Candidate fix patch uploaded.

In this patch, for each invalid blob it prints a helpful warning then deletes that blob from the muzzleflash. So with the example in this report, it prints the warning 4 times, once for each invalid blob.

~0012517

The_E (administrator)

Fix committed in revision 6816
+Notes

-Issue History
Date Modified Username Field Change
2010-03-27 03:54 FSF New Issue
2010-03-27 03:54 FSF File Added: mflash-tables.zip
2010-03-27 15:59 Genghis Assigned To => Genghis
2010-03-27 15:59 Genghis Status new => acknowledged
2010-03-28 21:04 Genghis File Added: fix_2164.diff
2010-03-28 21:06 Genghis Note Added: 0011841
2010-03-28 21:06 Genghis Status acknowledged => assigned
2010-12-09 14:55 The_E Note Added: 0012517
2010-12-09 14:55 The_E Status assigned => resolved
2010-12-09 14:55 The_E Fixed in Version => 3.6.13
2010-12-09 14:55 The_E Resolution open => fixed
+Issue History