Help fixing bugs in my own build

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Help fixing bugs in my own build

Post by Enjay »

For my own purposes, I'm using a slightly modified version of r116. However, that version had a couple of little bugs that I'd like to fix. The easy option would, of course, be to update to a newer revision. I had done, but the newer versions have even more annoying problems (primarily with the sound code, but the dynamic light thing is annoying too).

The only two things that are causing me problems with r116 are listed below. If I could get those sorted out, then my own build would be doing what I want and I could just update it properly as and when the other problems with newer versions get resolved. Both of the bugs listed below have been resolved officially - so fixes exist - but I can't figure out which bits of code I need to change because the fixes happened at the same time as other changes, and I'm puddling around in stuff I don't fully understand. If someone who knows this stuff was able to point me at which files and which lines I need to change (and to what) then I'd be a very happy chappy. :)

Bug 1 Bullet puffs cause splashes on 3D floors above splashing flats:
http://forum.drdteam.org/viewtopic.php?t=3316
My current workaround is just to add the +dontsplash flag to the bullet puffs, but that's not very satisfying.

This is the relevant note from the changes

Code: Select all

- fixed: splashes on 3D floors must not check the precise z coordinate but instead
  allow for some variation because puffs are not spawned directly on the floor. 

Bug 2 Platforms making sounds from their floor height
http://forum.zdoom.org/viewtopic.php?f= ... 5&p=345680

I think this is the relevant not from the changes

Code: Select all

- Replaced the naive area sound implementation with one that takes into
  consideration the size and shape of the sector producing the sound. See
  the lifts on Doom 2 MAP30 and compare with previous versions.
Thanks. :)
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Oh yeah, I forgot one

Bug 3 Players make gasp sound when spawning in multiplayer bug would be nice to fix too:

http://forum.zdoom.org/viewtopic.php?f= ... 3&p=352565

Code: Select all

- Fixed: Spawning a player could play the *gasp sound.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Post by Gez »

You should update to r120 to fix the splash issue. GL lighting code wasn't modified until r121 and the sound code changes happened from r124 onward; so r120 is "safe" for you.

On to the other bugs.
-Platform height sound: I think the fix is this (not 100% sure though).

-Gasp on respawn: look here.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, thank you. I'll try those.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Hmmm... I notice that I already have a compiled version of r117 and r121. I must have rejected both of those builds for some reason. I wonder what they were. :? I should have made notes. :( I'll have to check. The question is will I be able to spot the problem?

Anyway, I tried modifying my stuff and got this:

Code: Select all

.\src\p_plats.cpp(61) : error C2065: 'CHAN_FLOOR' : undeclared identifier
I think this one is more complex than originally thought. When I search through the more recent code for CHAN_FLOOR, I get this:
[spoiler]

Code: Select all

Searching for: CHAN_FLOOR
src\p_floor.cpp(324): SN_StartSequence (sec, CHAN_FLOOR, sec->seqType, SEQ_PLATFORM, 0);
src\p_floor.cpp(328): SN_StartSequence (sec, CHAN_FLOOR, "Floor", 0);
src\p_pillar.cpp(193): SN_StartSequence (sector, CHAN_FLOOR, sector->seqType, SEQ_PLATFORM, 0);
src\p_pillar.cpp(195): SN_StartSequence (sector, CHAN_FLOOR, "Floor", 0);
src\p_plats.cpp(61): SN_StartSequence (m_Sector, CHAN_FLOOR, m_Sector->seqType, SEQ_PLATFORM, 0);
src\p_plats.cpp(63): SN_StartSequence (m_Sector, CHAN_FLOOR, sound, 0);
src\p_plats.cpp(177): SN_StartSequence (m_Sector, CHAN_FLOOR, "Silence", 0);
src\p_plats.cpp(355): SN_StartSequence (sec, CHAN_FLOOR, "Silence", 0);
src\s_sound.cpp(745): if (channum == CHAN_FLOOR)
src\s_sound.h(250): #define CHAN_FLOOR				1	// Sound comes from the floor.
Found 10 occurrence(s) in 5 file(s)
[/spoiler]
The stuff in p_floor.cpp and p_pillar.cpp looks similar to the stuff for p_plats.cpp so I think I can change that easily enough. However, I have more problems with the other files:

s_sound.cpp has a whole block of stuff in more recent versions than existed in r120 and, frankly, I've no idea what is required.

s_sound.h looked like it should just be a case of adding the define in, but when I checked the newer code, I saw that a whole bunch of other defines had been added:
[spoiler]

Code: Select all

#define CHAN_FLOOR				1	// Sound comes from the floor.
#define CHAN_CEILING			2	// Sound comes from the ceiling.
#define CHAN_FULLHEIGHT			3	// Sound comes entire height of the sector.
#define CHAN_INTERIOR			4	// Sound comes height between floor and ceiling.
[/spoiler]
And I'm guessing that some of them may have to be used elsewhere to fully copy across this fix. Bottom line, I'm confused. :lol:
Also, I also got this:

Code: Select all

.\src\p_mobj.cpp(3771) : error C2660: 'APlayerPawn::ResetAirSupply' : function does not take 1 arguments
Searching for ResetAirSupply gives me this:
[spoiler]

Code: Select all

Searching for: ResetAirSupply
src\d_player.h(129): bool ResetAirSupply (bool playgasp = true);
src\p_mobj.cpp(3614): p->mo->ResetAirSupply(false);
src\p_user.cpp(907): // If we were running out of air, then ResetAirSupply() will play *gasp.
src\p_user.cpp(915): // APlayerPawn :: ResetAirSupply
src\p_user.cpp(923): bool APlayerPawn::ResetAirSupply (bool playgasp)
src\p_user.cpp(2279): player->mo->ResetAirSupply ();
src\g_shared\a_artifacts.cpp(794): Owner->player->mo->ResetAirSupply ();
Found 7 occurrence(s) in 4 file(s)
[/spoiler]
That, however, looks a lot more straight forward and I think I will be able to change those entries to agree with the newer code where it is required.

So, I should be able to fix the gasp sound and may, or may not update to r120 (depending on whether I find any problems with r117 or, indeed r120) but it looks like the platform sound thing is beyond me ATM.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, well the reason for rejection of r121 is that the invulnerability/enhanced lightamp effect changed sprites into black instead of the usual inverted greyscale effect. So, I'll have to check if that was in r120. Can't figure out why I didn't like r117 though. :?
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Post by Gez »

Second part of gasp fix: here.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Heh he, thanks, I just managed to catch that one myself. :)

OK, so what have I achieved? Well, there was a nagging doubt at the back of my mind that there was likely to be something outstanding from r120 that I didn't like so I decided to see if I could identify the stuff needed for the 3D floor splash fix and apply it to r116 after all. Looking at it again, I was able to identify what I needed... well kind of. Two bugs related to 3D floors were fixed in the same revision and I wasn't sure which related to what so I thought I may as well transfer over all the changes and fix both. It worked!

Also, even though it wasn't causing a problem in r116, Graf mentioned that the dynamic light bug had been around since before it became obvious a few versions ago so I fixed that one as well.

Then I went back to the gasp bug and got that sorted out too.

One thing I was wondering. Since the fix, sometimes ResetAirSupply is written like this:
ResetAirSupply ();
Which is how all instances were before the fix. However, others are like this:
ResetAirSupply (bool playgasp = true);
ResetAirSupply(false);
ResetAirSupply (bool playgasp)

It all seems to work. I was just wondering why the two instances of ResetAirSupply (); didn't need to be changed to something else?


So, anyway, the only one I'm left with is the floor moving sounds. Because it seems to involve so many changes to so many files at the same time as other things changed, it's way beyond my talents to try and identify what is required. I'd like to have a go at fixing it but, if I can't, it's no big deal. Things have improved as aresult of the other fixes anyway and, presumably, a fully fixed proper version will be available sooner or later whenever Graf and Randy manage to get time for it.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Enjay wrote: One thing I was wondering. Since the fix, sometimes ResetAirSupply is written like this:
ResetAirSupply ();
Which is how all instances were before the fix. However, others are like this:
ResetAirSupply (bool playgasp = true);
ResetAirSupply(false);
ResetAirSupply (bool playgasp)

It all seems to work. I was just wondering why the two instances of ResetAirSupply (); didn't need to be changed to something else?
That's quite simple: '= true' defines a default parameter so that if it isn't specified 'true' is substituted.

BTW, if the dynamic light issue is your main problem, that one's fixed.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Thanks for the explanation.

I caught the dynamic light fix and, even though it wasn't causing a problem in r116, I applied it anyway. The main thing I (we?) are waiting for now is for the sound fixes that Randy needs to look at. They haven't been hugely problematic for me but I've seen (and heard) enough for me to want a fix before moving on to a newer version for my own build because r116 has been absolutely fine for me, other than the minor problems noted. Maybe I'll try a build of r137 and see how it works out.

On the 3D floor splash bug, I've noticed (and filed a bug report) that if you have a very thin 3D floor, the problem can still happen.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, I compiled my own mod of r137 and it seemed to perform very well. No obvious problems with sound during gameplay and nothing big like any crashes or anything. It'll need a more extensive workout though.

The only real annoyance I had was the already known about Zdoom bug of the option menu being silent whilst you are using it, then all the sounds suddenly playing at once when you exit the menu. Personally, I find that more annoying than the platform sound bug in r116.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Enjay, can you upload your custom EXE? I hate the silent option bug so much (it literally drives me nuts) and the other sound-related bugs.

I would also like to ask for your permission to upload it to my webspace - clearly labeled that it's your build of course.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Post by Gez »

Here's mine:
http://www.zshare.net/download/15726054aa8e69aa/

r137m, the code includes my latest patch proposal over at the ZDoom forum but is otherwise unmodified.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

There's not much point. I said the silent option thing was bugging me, not that I'd fixed it. I haven't and have no idea how to. :( It's r116 that doesn't have that bug, not my version of r137. My version of r116 has the 3 bugs above fixed (3D floor splash, player gasp and the dynamic light thing) but anything else that was wrong with r116 will still be present - it's just that it doesn't affect me.

Anyway, my custom exe changes a lot more things than just the bits and pieces mentioned above. It's mainly cosmetic stuff but enough to make it useless to other people.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Enjay, I see. I misread your post then.

Gez, thanks but if it doesn't fix the options menu sound bug then there's really no point. Sorry. :(
Locked

Return to “GZDoom”