Floaty mana on MAP37 of Hexen

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Floaty mana on MAP37 of Hexen

Post by Blue Shadow »

Tested with: 2.8pre-1185-g3376829

In Menelkir's Tomb after you solve the symbols and cube puzzle, a mana item spawns on each cube.

In the tested build, the mana items spawn but never drop to the floor. They stay there floating in the air.

Image


In 2.7.1 (and Chocolate Hexen), the mana items will end up on the floor.

Image
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Floaty mana on MAP37 of Hexen

Post by cocka »

Strange, but there are other items behaving the same way as well:

http://i.imgur.com/TSy8YTq.png
http://i.imgur.com/1Ioe6J2.png
http://i.imgur.com/tALVItH.png
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Ugh. Not again. In his infinite wisdom Randi once chose to make most of Hexen's pickups NOGRAVITY, so that they work better with the altered floatbobbing and it can't really be surprising that this now causes problems.
The first time such a thing got reported I was able to work around it with some compatibility.txt handling, but it seems that something needs to be done about it for real.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Floaty mana on MAP37 of Hexen

Post by cocka »

Is that a viable way to make a compatibility flag for it? NOGRAVITY for Hexen pick up items ON/OFF
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Well, to be honest, I have no idea how Randi even got the idea that this fix might be proper.

Just starting an old version of ZDoom, flying into the air and summoning some pickup, it certainly falls down, just like anything else.
So whatever this was supposed to accomplish, the solution is dead wrong.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Ok, well, the original code was even nastier. It yanks the item to the floor each frame so that they never fly.
Which still doesn't mean that NOGRAVITY is even remotely the correct thing to do here. My guess is that some random guy complained about his own ineptness at DECORATing and Randi dilligently complied.

But whatever, in Hexen these things do not fly in the air, in old ZDoom they didn't and I don't think they should now. If someone needs a NOGRAVITY item, do it yourselves!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Reverted them all, with the exception of the fog spawner.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Floaty mana on MAP37 of Hexen

Post by cocka »

I agree. :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Interestingly, I dug out the report that prompted the change.

http://forum.zdoom.org/viewtopic.php?f=7&t=37971

And this had nothing to do with the change of how floatbobbing works, that map doesn't work as described in older ZDooms as well. I'd really like to run some comparisons with another engine but is there even something that can run Hexen and is not Doomsday and comes with a readily compilable source?


I'd like to address this issue properly, not by a band-aid change that does more harm than good.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Ok, so just looking at the Chocolate source revealed something really sneaky:

Hexen performs some very special actions when the FLOATBOB flag is set:

The item's map height value is not just used for spawning, it is also stored in 'special1'.
Now when the actual floatbobbing is performed it actually calculates: item->floorz+item->special1+floatboboffset.

Of course this behavior is completely and utterly incompatible with anything ZDoom does and unconditionally enabling it will inevitably break many, many ZDoom mods out there.
What this needs is a real compatibility option that gets set for any Hexen IWAD map and any map coming with a Hexen format MAPINFO, anything else will inevitably blow up again.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Floaty mana on MAP37 of Hexen

Post by cocka »

it is also stored in 'special1'.
Yes, it's the mysterious special field that the modders shouldn't know anything about. :)
tem->floorz+item->special1+floatboboffset.
Is that a C++ source?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

No, just some short explanation what it does.
ZDoom never hat the 'special1' part so obviously the items never behaved as intended and the last attempt to fix it inevitably backfired because it was done withut even checking the original implementation.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Floaty mana on MAP37 of Hexen

Post by cocka »

hat


Wie bitte? :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Floaty mana on MAP37 of Hexen

Post by Graf Zahl »

Heh, should be a d, not a t.

Well, anyway, I managed to address the real problem properly now, but doing so only for old Hexen maps.
I think this should teach one lesson: Sometimes a quick band-aid fix seems to be attractive but many times this will backfire miserably later.
It's always better to investigate what's going on and try to address an issue properly. In this case it wouls have spared us from a lot of trouble - and some people may even notice now that some maps they made over the last few months (not that there are many Hexen projects to begin with...) no longer behave as intended. Well, sorry, can't be helped in this situation.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Floaty mana on MAP37 of Hexen

Post by NeuralStunner »

Graf Zahl wrote:Well, anyway, I managed to address the real problem properly now, but doing so only for old Hexen maps.
Does this mean that floatbob is still visual-only in other cases?
Post Reply

Return to “Closed Bugs [GZDoom]”