View Issue Details

IDProjectCategoryView StatusLast Update
0002759FSSCPmodelspublic2012-12-24 05:53
ReporterFUBAR-BDHR Assigned ToFUBAR-BDHR  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.15 
Fixed in Version3.6.15 
Summary0002759: Docking points not checked for null normals
DescriptionFound an old model the other day with both points of it's rearm dock having normals of 0:0:0. Figured this is something that should be checked for.
Steps To ReproduceEdit any model and change a dock point normal to 0:0:0. Load model. No errors.
Additional InformationAttached is a patch with warning.
TagsNo tags attached.

Activities

FUBAR-BDHR

2012-12-22 22:41

developer  

dock_null_norm.patch (561 bytes)   
Index: model/modelread.cpp
===================================================================
--- model/modelread.cpp	(revision 9460)
+++ model/modelread.cpp	(working copy)
@@ -1724,6 +1724,9 @@
 						for (j = 0; j < bay->num_slots; j++) {
 							cfread_vector( &(bay->pnt[j]), fp );
 							cfread_vector( &(bay->norm[j]), fp );
+							if(vm_vec_mag(&(bay->norm[j])) <= 0.0f) {
+								Warning(LOCATION, "Model '%s' dock point '%s' has a null normal. ", filename, bay->name);
+							}
 						}
 
 						if(vm_vec_same(&bay->pnt[0], &bay->pnt[1])) {
dock_null_norm.patch (561 bytes)   

FUBAR-BDHR

2012-12-24 05:53

developer   ~0014573

Committed r9463

Issue History

Date Modified Username Field Change
2012-12-22 22:41 FUBAR-BDHR New Issue
2012-12-22 22:41 FUBAR-BDHR Status new => assigned
2012-12-22 22:41 FUBAR-BDHR Assigned To => FUBAR-BDHR
2012-12-22 22:41 FUBAR-BDHR File Added: dock_null_norm.patch
2012-12-22 22:41 FUBAR-BDHR Status assigned => code review
2012-12-24 05:53 FUBAR-BDHR Note Added: 0014573
2012-12-24 05:53 FUBAR-BDHR Status code review => resolved
2012-12-24 05:53 FUBAR-BDHR Fixed in Version => 3.6.15
2012-12-24 05:53 FUBAR-BDHR Resolution open => fixed