View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004213 | The Dark Mod | Script/Def | public | 10.09.2015 19:53 | 04.01.2016 19:21 |
Reporter | VanishedOne | Assigned To | SteveL | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.03 | ||||
Target Version | TDM 2.05 | Fixed in Version | TDM 2.05 | ||
Summary | 0004213: "ambient_light" "0 0 0" doesn't work on info_location | ||||
Description | If the ambient_light spawnarg on an info_location is zero, the global ambient will be used instead, to the mapper's likely surprise. (The obvious workaround is to set the ambient very low but not zero.) It's because of the way nonexistent/unset keys are handled (quoting from script/tdm_location_settings.script): // fade to the new location's color m_al_base_target = locEnt.getVectorKey("ambient_light"); // tels: can this be done simpler? == "0,0,0" doesn't work, tho if (m_al_base_target_x == 0 && m_al_base_target_y == 0 && m_al_base_target_z == 0) { // no value found, use the default // sys.print( "No new target, using default color '" + m_al_default_color + "'\n"); m_al_base_target = m_al_default_color; } Possible fix: // fade to the new location's color m_al_base_target = locEnt.getVectorKey("ambient_light"); if (locEnt.getKey("ambient_light") == "") m_al_base_target = m_al_default_color; | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Good spot. For ease of reading I'd probably reword it to: if ( locEnt.getKey("ambient_light") != "" ) { m_al_base_target = locEnt.getVectorKey("ambient_light"); } else { m_al_base_target = m_al_default_color; } |
|
Sorry about that bug. IIRC correctly, the way to compare a vector is: if (m_al_base_target == '0,0,0') { ... } (not "0,0,0", but '0,0,0') which I simply didn't know back then. The case of a non-existant key vs. 0,0,0 of course would still be present. |
|
Fantastic test map! Thanks, if every bug report came this well-equipped we'd churn through 50 a day :) committed at rev 14396 script\tdm_location_settings.script |
|
Date Modified | Username | Field | Change |
---|---|---|---|
10.09.2015 19:53 | VanishedOne | New Issue | |
10.09.2015 19:53 | VanishedOne | File Added: amb.map | |
10.09.2015 19:55 | VanishedOne | Description Updated | |
13.09.2015 20:40 | SteveL | Assigned To | => SteveL |
13.09.2015 20:40 | SteveL | Status | new => assigned |
13.09.2015 20:50 | SteveL | Note Added: 0007768 | |
25.09.2015 11:58 | tels | Note Added: 0007799 | |
30.09.2015 19:00 | SteveL | Note Added: 0007816 | |
30.09.2015 19:00 | SteveL | Status | assigned => resolved |
30.09.2015 19:00 | SteveL | Resolution | open => fixed |
30.09.2015 19:00 | SteveL | Fixed in Version | => TDM 2.04 |
30.09.2015 19:00 | SteveL | Target Version | => TDM 2.04 |
04.01.2016 19:21 | grayman | Fixed in Version | TDM 2.04 => TDM 2.05 |
04.01.2016 19:21 | grayman | Target Version | TDM 2.04 => TDM 2.05 |