Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: FUBAR-BDHR on November 09, 2008, 02:50:40 pm

Title: Enable 3D shockwave?
Post by: FUBAR-BDHR on November 09, 2008, 02:50:40 pm
Well I assume this has something to do with the 2D/3D shockwaves in FS2 but how does it effect other mods like TBP?  Should it be on of off by default?
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 09, 2008, 05:54:50 pm
It will need a little bit of work before it's done, but it should be a fallback for when both 2d and 3d are present, leaving it off should force it to ignore the shockwave.pof file, and enabling it will use the 3d shockwave if it's there.  Currently though, leaving it off forces it to ignore shockwave.pof even if there is no 2d alternative, and there is no 3d shockwave defined in the tables.
Title: Re: Enable 3D shockwave?
Post by: FUBAR-BDHR on November 09, 2008, 06:41:04 pm
So could leaving it off cause something like black squares instead of explosions to appear?
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 09, 2008, 06:42:46 pm
In TBP?  Perhaps.  Not with FS2 though I don't think, or it shouldn't anyway.
Title: Re: Enable 3D shockwave?
Post by: Spicious on November 09, 2008, 08:21:19 pm
There was still some debate as to which should be the default, what the option should be called and under which section of the launcher it should appear.

Edit: If someone were to apply the attached patch, it would fix the immediate issue. The option name wouldn't make much sense though.

[attachment deleted by necromancer]
Title: Re: Enable 3D shockwave?
Post by: FUBAR-BDHR on November 09, 2008, 08:28:19 pm
Well that was what was causing the black squares around explosions in TBP.  I think it has something to do with a combination of that not being on and using starfield.pof. 

Double checked with a quick test mission.  Explosions without flag on and with no skybox model work.  Explosions without flag on and with skybox = black boxes.  Explosions with flag on and skybox work. 



[attachment deleted by necromancer]
Title: Re: Enable 3D shockwave?
Post by: DarthWang on November 09, 2008, 08:43:59 pm
I get black squares as well
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 09, 2008, 10:08:14 pm
Yeah that's what I said, it's a known problem where only having a shockwave.pof and no 2d shockwave available will break it when that box is unchecked.  It should be fixed soon I hope.
Title: Re: Enable 3D shockwave?
Post by: FUBAR-BDHR on November 10, 2008, 12:52:32 pm
Is there any way that this feature can be defaulted to on base on the TBP flag being set?
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 10, 2008, 02:59:50 pm
Fixing it so it's based on whether a 2d shockwave is present or not will take care of the problem, there's no need for additional checks.  Granted TBP and WCS should have defined the shockwaves in their tables in the first place, then I don't believe this flag would have broken anything, but since that was never a requirement before it shouldn't just become one now.
Title: Re: Enable 3D shockwave?
Post by: FUBAR-BDHR on November 10, 2008, 03:37:27 pm
The problem is this isn't the only new flag causing problems for TBP.  The show models for missiles is also a problem.  Every time you switch between 3.6.9 and 3.6.10 it defaults to off when it needs to be on. 
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 10, 2008, 04:58:15 pm
Shouldn't models be shown for missiles if they're set up that way in the table?  The flag shouldn't matter I thought.

And that's what I'm trying the say, we know the shockwave flag is broken, it won't be remaining that way.  Since it's in trunk though, if you want to file a bug about it, go ahead.  That way we don't forget about it.
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 12, 2008, 11:21:46 am
Spicious, I missed that you had posted another patch earlier.  However, I'm not sure it will fix the problem, since it appears the code should be asserting if neither a 2d or 3d shockwave has been loaded.  Since it doesn't seem to be asserting, I'm guessing that the i variable is getting set to a positive number, but I can't test this at the moment since I broke my install that had VC installed.  If it's setting like I think it is, this code won't change anything, and we'll need to rethink this option, perhaps even revert back to the disable option after all.

However, I might be reading that assert wrong too.  It needs to be checked though, whatever the case.
Title: Re: Enable 3D shockwave?
Post by: Spicious on November 12, 2008, 04:16:57 pm
This will change it to try the default 3d if loading the default 2d fails (and the flag is not present or loading the default 3d already failed). Regardless, a negative value for i there indicates failure. However, it isn't asserted; there's just that error message.
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 12, 2008, 05:50:06 pm
So then this:

Code: [Select]
Assert( ((Shockwave_info[0].bitmap_id >= 0) || (Shockwave_info[0].model_id >= 0)) );
Has nothing to do with making sure that the shockwave was just loaded?  I wasn't sure because it was referencing index 0 of Shockwave_info, and I wasn't sure whether that was supposed to be this shockwave or something else.  So then I take it the error is probably occuring.  I will probably try asserting that i is positive instead of just writing that error just to make sure that's happening, or at least trying to find that error showing up somewhere.  I'm guessing that goes to one of the logs.
Title: Re: Enable 3D shockwave?
Post by: chief1983 on November 12, 2008, 06:11:32 pm
Ok, after looking closer at TBP's files and your posts Fubar, it sounds like you said the 2d shockwave was working, when skyboxes were disabled.  That either sounds like a bug with 2d (possibly just eff) shockwaves + skyboxes in general, or just TBP's effects, but it's not because of a lack of a 2d shockwave.