|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002120||FSSCP||SEXPs||public||2010-02-10 14:22||2010-08-26 23:43|
|Platform||IBM PC||OS||MS Windows||OS Version||Vista SP2|
|Target Version||Fixed in Version||3.6.12|
|Summary||0002120: 'is-primary-selected' returns wrong value if primaries linked|
|Description||Since a ship can only have one primary as the currently selected one, this SEXP returns false for every bank but the last one before primaries were linked.|
This is of course wrong behavior. When primaries are linked this should return true for ALL primary banks.
This SEXP is checking whether a gun is active and will fail if it isn't active.
I provided a patch that fixes this. In the long run it might be beneficial to also have a 'are-primaries-linked' SEXP in case this special case should be handled differently.
However this fix is necessary right now because it interpretes game data wrong, therefore one cannot handle linked primaries correctly at the moment.
if one checks for
is-primary-selected (bank 1)
is-primary-selected (bank 2)
on a two-primaries fighter, it will return false when primaries are linked.
because in that case bank 2 is most likely selected as the current primary.
This should however return true, since both banks are active.
The game ignores the currently selected primary variable when primaries are linked, and so should the SEXP.
As mentioned, patch attached.
|Tags||No tags attached.|
Last edited: 2010-02-10 23:58
Yeah, it seems that when banks are linked, Bank 0 (Primary 1) and Bank 1 (Primary 2) become considered as being Bank 0, so checks on Bank 1 fail because it "technically" doesn't exist while they are linked.
Technically, I think the attached one line change _should_ handle the idea better, but it may require some testing to verify that it works as well as I think it does.
|We'll go ahead with it and make sure it works during the RC phase. Just keep it in mind when testing.|
I tested it with some SEXP events that change some HUD element.
Checking for both banks to be true with an "and" condition works when linked.
For one being active
Bank1 selected AND NOT bank2 selected
works also fine
NOT (AND bank1 selected, bank2 selected) never triggers
so this works as expected from my point of view.
|Committed Zacam's version in r5900.|
|No additional feedback, marking as resolved.|
|2010-02-10 14:22||KeldorKatarn||New Issue|
|2010-02-10 14:22||KeldorKatarn||File Added: is-primary-selected.patch|
|2010-02-10 23:55||Zacam||Note Added: 0011630|
|2010-02-10 23:55||Zacam||File Added: M2120_patch_02102010.patch|
|2010-02-10 23:58||Zacam||Note Edited: 0011630|
|2010-02-11 00:22||Zacam||Status||new => feedback|
|2010-02-11 04:08||Zacam||Status||feedback => assigned|
|2010-02-11 04:08||Zacam||Assigned To||=> Zacam|
|2010-02-11 04:09||Zacam||Status||assigned => feedback|
|2010-02-11 11:10||chief1983||Note Added: 0011644|
|2010-02-11 11:21||KeldorKatarn||Note Added: 0011645|
|2010-02-11 11:30||chief1983||Note Added: 0011647|
|2010-08-26 23:43||Zacam||Note Added: 0012333|
|2010-08-26 23:43||Zacam||Status||feedback => resolved|
|2010-08-26 23:43||Zacam||Fixed in Version||=> 3.6.12|
|2010-08-26 23:43||Zacam||Resolution||open => fixed|