After noticing yet another bug in Mantis
to do with Special Explosions/Special Hits I flippantly asked if we could simply refactor the entire system into something that wasn't pants on head retarded.
The more I thought about it the more I liked it. The system the old code had was that Special hits/explosions values were saved into special SEXP variables, the index of this variable is then saved into the ship data. This means that simply setting one special explosion uses up 6 SEXP variables and attempting to set explosions/hits for more than one ship at a time is an exercise in frustration that might result in it working, it leaving useless block variables in the mission file, it failing to work completely except on the first ship in the mission file or it crashing FRED.
Refactoring the code should remove this annoyance and might make it possible to have SEXPs which change a ship's HP, shields or explosions while the mission is running.
Anyway, here's a build
that does that.
Users of the FS2 builds should notice no difference whatsoever between this build and a corresponding trunk build without this feature. Users of FRED are strongly advised to back up any mission before loading them into these FRED builds.
These builds WILL change the save format of any mission that uses special-hits or special-explosions and once they are changed there is no way to get that data back without a lot of notepad editing.
That said these builds do need testing to ensure that they do work so FREDders are strongly encouraged to do so now before these features hit trunk and are then found to have bugs in them.
NB, it's a minor change but the new Special-hits/explosions editors take their default values from the selected
ship (i.e the green one) rather than the first marked ship (i.e the first green or yellow one in the mission file).