View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002911 | FSSCP | SEXPs | public | 2013-08-25 17:28 | 2013-09-11 07:51 |
| Reporter | Axem | Assigned To | niffiwan | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0002911: activate-glowpoint-bank will always activate bank 0 | ||||
| Description | activate-glowpoint-bank will always activate bank 0 even if we're activating a completely different glowpoint bank. Bug can be seen in the attached mission. The only event turns off all the glowpoints on Alpha 1 and then turns bank 2 (the glowpoint on the bottom fin) on. The result is bank 0 (the green light on the wing) and bank 2 turn on. (Needs MediaVPs) | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
Looks like the sexp function (sexp_activate_deactivate_glow_point_bank) is processing the 1st argument twice. Once for the ship lookup & once as a glowpoint bank. If this is correct, should be an easy fix. |
|
|
mantis2911-svn.patch (441 bytes)
Index: code/parse/sexp.cpp
===================================================================
--- code/parse/sexp.cpp (revision 9753)
+++ code/parse/sexp.cpp (working copy)
@@ -15984,7 +15984,7 @@
sindex = ship_name_lookup(CTEXT(n), 1);
if (sindex >= 0)
{
- for ( ; n != -1; n = CDR(n))
+ for ( n = CDR(n); n != -1; n = CDR(n))
{
num = eval_num(n);
if (num >= 0 && num < (int)Ships[sindex].glow_point_bank_active.size())
|
|
|
The (what I think are) baked glows around glowpoint bank 2 had me scratching my head for a while, but I'm pretty sure the attached patch fixes the problem. |
|
|
Belatedly read the comments on IRC; with the patch, in the test mission the green wing glowpoint definitely stays off, but I was also modifying the test mission to check what happened with turning on other glowpoint banks. With glowpoint bank 2 on the Perseus it's very red at the bottom fin tip even with all glowpoints off. Maybe that's due to a baked glow, I'm not sure since I'm a near complete modeling noob :) Anyway, I was hoping someone more experienced with modeling (Axem :)) could verify that the patch works as expected, in particular the effects on bank 2. After that, code review (although it really is a trivial change) & maybe commit in time for 3.7.0? :) |
|
|
As requested, an exec for testing: http://www.mediafire.com/download/4dxjyrvhuv4vpc7/fs2_open_3_7_1_SSE2_2911.7z |
|
|
Fix committed to trunk@9780. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-08-25 17:28 | Axem | New Issue | |
| 2013-08-25 17:28 | Axem | File Added: mantis_glowpointbug.fs2 | |
| 2013-08-30 06:48 | niffiwan | Note Added: 0015253 | |
| 2013-08-30 09:08 | niffiwan | Assigned To | => niffiwan |
| 2013-08-30 09:08 | niffiwan | Status | new => assigned |
| 2013-08-30 09:08 | niffiwan | File Added: mantis2911-svn.patch | |
| 2013-08-30 09:10 | niffiwan | Note Added: 0015254 | |
| 2013-08-30 09:10 | niffiwan | Status | assigned => feedback |
| 2013-08-31 10:27 | niffiwan | Note Added: 0015256 | |
| 2013-09-03 10:28 | niffiwan | Note Added: 0015261 | |
| 2013-09-11 07:51 | niffiwan | Changeset attached | => fs2open trunk r9780 |
| 2013-09-11 07:51 | niffiwan | Note Added: 0015269 | |
| 2013-09-11 07:51 | niffiwan | Status | feedback => resolved |
| 2013-09-11 07:51 | niffiwan | Resolution | open => fixed |