View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002726 | FSSCP | models | public | 2012-11-12 22:14 | 2012-11-15 07:27 |
| Reporter | FUBAR-BDHR | Assigned To | Goober5000 | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.15 | ||||
| Summary | 0002726: Table/model checks for number of lods not working properly | ||||
| Description | I noticed several ships with number of lods defined in the table != number in the pof. This is supposed to warn but I was not getting any warnings. I did some checking and found the following in ship.cpp at line 8708: [code] if ( sip->num_detail_levels < pm->n_detail_levels ) { Warning(LOCATION, "For ship '%s', detail level\nmismatch. Table has %d,\nPOF has %d.", sip->name, sip->num_detail_levels, pm->n_detail_levels ); for (i=0; i<pm->n_detail_levels; i++ ) { sip->detail_distance[i] = 0; } } [/code] Changing that to != did produce: For ship 'CR Primus', detail level mismatch. Table has 4, POF has 1. Doing some further searching it also appears that at line 8894 there is also the following: [code] if ( sip->num_detail_levels < pm->n_detail_levels ) { Warning(LOCATION, "For ship '%s', detail level\nmismatch (POF needs %d)", sip->name, pm->n_detail_levels ); for (i=0; i<pm->n_detail_levels; i++ ) { sip->detail_distance[i] = 0; } } [/code] This check also appears to be incorrect. | ||||
| Additional Information | FS2_Open trunk r9343. Code was added by Goob in r4050 and r1770 | ||||
| Tags | No tags attached. | ||||
|
|
[s]Just to make sure we don't miss the obvious, you're running on a debug build, right? Warnings don't show up in release builds.[/s] EDIT: Nevermind, I see what you mean. |
|
|
FFFF... I had a long comment written up here and then Mantis ate it. Suffice it to say that this theoretically shouldn't be a problem but practically it is (due to the code conflating the array sizes for models and ships in various places). I've fixed it in trunk, and also applied the fix to weapons and asteroids. Fortunately, none of the retail data has mismatched LODs, so the warning won't be displayed there. |
|
|
Well, retail asteroids do, at any rate. Anyway, fixed in r9346. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-11-12 22:14 | FUBAR-BDHR | New Issue | |
| 2012-11-12 22:35 | FUBAR-BDHR | Additional Information Updated | |
| 2012-11-15 01:42 | Goober5000 | Note Added: 0014039 | |
| 2012-11-15 01:42 | Goober5000 | Assigned To | => Goober5000 |
| 2012-11-15 01:42 | Goober5000 | Status | new => feedback |
| 2012-11-15 01:43 | Goober5000 | Note Edited: 0014039 | |
| 2012-11-15 06:54 | Goober5000 | Note Added: 0014040 | |
| 2012-11-15 07:27 | Goober5000 | Note Added: 0014041 | |
| 2012-11-15 07:27 | Goober5000 | Status | feedback => resolved |
| 2012-11-15 07:27 | Goober5000 | Resolution | open => fixed |