View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002646 | FSSCP | graphics | public | 2012-05-05 21:17 | 2012-07-02 00:51 |
Reporter | Yarn | Assigned To | CommanderDJ | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows 7 | ||
Product Version | 3.6.13 | ||||
Summary | 0002646: Default sun is not created | ||||
Description | 3.6.14 RC6 does not create the default white sun in missions that don't have any suns defined. This results in such missions being much darker that other missions. Default sun creation works fine in RC5. | ||||
Steps To Reproduce | Load any mission that has no suns defined, such as the one I've attached. No sun will exist if the mission is played in RC6. | ||||
Tags | No tags attached. | ||||
|
|
|
Revision 8596 introduced this bug. Also, the second sentence in the description should say "much darker THAN other missions." |
|
mantis2646.patch (572 bytes)
Index: code/starfield/starfield.cpp =================================================================== --- code/starfield/starfield.cpp (revision 8757) +++ code/starfield/starfield.cpp (working copy) @@ -103,7 +103,7 @@ int n_verts; vertex *verts; - starfield_bitmap_instance() : scale_x(1.0f), scale_y(1.0f), div_x(1), div_y(1), star_bitmap_index(-1), n_verts(0), verts(NULL) { + starfield_bitmap_instance() : scale_x(1.0f), scale_y(1.0f), div_x(1), div_y(1), star_bitmap_index(0), n_verts(0), verts(NULL) { ang.p = 0.0f; ang.b = 0.0f; ang.h = 0.0f; |
|
Yarn, could you please test if the attached patch fixes the issue? |
|
Yes, it works. |
|
Thank you. I tested it as well and it works on my end. Whoever copied the stuff in rev 8596 into an initialiser list must have accidentally changed that 0 to a -1. Simple one line fix. Changing status to code review so that someone can commit it. |
|
Fix committed to trunk@8758. |
|
It wasn't the transformation to an initializer list that caused the problem. It was the removal of these lines in stars_post_level_init()... def_sun.star_bitmap_index = 0; def_sun.scale_x = 1.0f; def_sun.scale_y = 1.0f; def_sun.div_x = 1; def_sun.div_y = 1; But it looks like the intention *was* to set the bitmap index to 0, so the fix is appropriate. The only question is whether people who explicitly want *no* suns in the mission are still able to do that. |
|
I don't think it's possible to have no suns right now unless a build with this bug (such as RC6) is used. Perhaps the only proper way to allow no suns would be to support a "Don't create default sun" flag in the mission file. Keep in mind that retail FS2 always creates the default sun when no suns are present, and a number of missions (including many in FSPort) depend on this behavior for proper lighting. |
|
So allowing FREDers to have *no* suns in their missions would be a new feature? |
|
Yes, it would. |
|
If I might weigh in here, in the interest of backward compatibility I think we should keep the default sun. In the particular mission where this bug was found, it was noted that it was horrendously dark, dark enough to impact gameplay and cause the player to smash into things like the AI does. We shouldn't break lighting in all the missions that, as Yarn said, rely on this for proper lighting. In light of this, I think the request for no suns should be a new feature request, and this bugfix should be left as it is. |
|
Okay, I just wanted to make sure that this wasn't an undocumented "feature" that people were using. Marking as resolved then. |
|
Fix committed to fs2_open_3_6_14@8928. |
fs2open: trunk r8758 2012-05-05 23:46 Ported: N/A Details Diff |
From CommanderDJ: Fix for mantis 0002646 |
Affected Issues 0002646 |
|
mod - /trunk/fs2_open/code/starfield/starfield.cpp | Diff File | ||
fs2open: fs2_open_3_6_14 r8928 2012-07-01 20:52 Ported: N/A Details Diff |
Backport: Trunk r8758; From CommanderDJ: Fix for mantis 0002646 |
Affected Issues 0002646 |
|
mod - /branches/fs2_open_3_6_14/code/starfield/starfield.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-05 21:17 | Yarn | New Issue | |
2012-05-05 21:17 | Yarn | File Added: EmptyMission.zip | |
2012-05-05 22:21 | Yarn | Note Added: 0013517 | |
2012-05-06 03:07 | CommanderDJ | File Added: mantis2646.patch | |
2012-05-06 03:08 | CommanderDJ | Note Added: 0013518 | |
2012-05-06 03:08 | CommanderDJ | Assigned To | => CommanderDJ |
2012-05-06 03:08 | CommanderDJ | Status | new => assigned |
2012-05-06 03:29 | Yarn | Note Added: 0013519 | |
2012-05-06 03:33 | CommanderDJ | Note Added: 0013520 | |
2012-05-06 03:33 | CommanderDJ | Status | assigned => code review |
2012-05-06 03:36 | CommanderDJ | Note Edited: 0013520 | |
2012-05-06 03:44 | niffiwan | Changeset attached | => fs2open trunk r8758 |
2012-05-06 03:44 | niffiwan | Note Added: 0013521 | |
2012-05-06 03:44 | niffiwan | Status | code review => resolved |
2012-05-06 03:44 | niffiwan | Resolution | open => fixed |
2012-05-09 16:58 | Goober5000 | Note Added: 0013528 | |
2012-05-09 16:59 | Goober5000 | Status | resolved => code review |
2012-05-09 17:44 | Yarn | Note Added: 0013529 | |
2012-05-09 21:21 | niffiwan | Note Added: 0013531 | |
2012-05-09 21:32 | Yarn | Note Added: 0013532 | |
2012-05-10 00:29 | CommanderDJ | Note Added: 0013533 | |
2012-05-12 02:43 | Goober5000 | Note Added: 0013547 | |
2012-05-12 02:43 | Goober5000 | Status | code review => resolved |
2012-07-02 00:51 | Zacam | Changeset attached | => fs2open fs2_open_3_6_14 r8928 |
2012-07-02 00:51 | Zacam | Note Added: 0013756 |