Floaty mana on MAP37 of Hexen

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Floaty mana on MAP37 of Hexen

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 5:18 pm

... and that's why I added this somewhat hacky compatibility option - because for obvious reasons it can't be set as a per-class option. This entire report was about problems caused by NOGRAVITY, after all...

So obviously we do not need to expose this compatibility handling as a mapping option, it's merely to fix problems that established ZDoom behavior causes with vanilla Hexen maps.

Re: Floaty mana on MAP37 of Hexen

by Gez » Thu Feb 12, 2015 4:21 pm

Indeed it does, though it needs to be used in conjunction with NOGRAVITY.

Re: Floaty mana on MAP37 of Hexen

by NeuralStunner » Thu Feb 12, 2015 4:06 pm

Gez wrote:Actually I think that behavior could be the subject of a new flag. Having an item keep a constant height above the floor (even if the floor height changes) seems like it could be useful in a general case. It could notably allow to fix the behavior of the Heretic key gizmos (place one on a lift, notice behavior of ball).
Looks like it already exists.

Re: Floaty mana on MAP37 of Hexen

by Gez » Thu Feb 12, 2015 3:59 pm

The floatbobbing is visual only in all case; the only change is for the behavior of floatbobbing items with a non-null Z-height in a classic Hexen map.

When the compatibility is enabled, the starting Z height is kept. When disabled, items fall to the floor.



Actually I think that behavior could be the subject of a new flag. Having an item keep a constant height above the floor (even if the floor height changes) seems like it could be useful in a general case. It could notably allow to fix the behavior of the Heretic key gizmos (place one on a lift, notice behavior of ball).

Re: Floaty mana on MAP37 of Hexen

by NeuralStunner » Thu Feb 12, 2015 3:44 pm

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?

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 12:01 pm

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.

Re: Floaty mana on MAP37 of Hexen

by cocka » Thu Feb 12, 2015 11:50 am

hat


Wie bitte? :)

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 10:50 am

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.

Re: Floaty mana on MAP37 of Hexen

by cocka » Thu Feb 12, 2015 10:23 am

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?

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 10:16 am

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.

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 9:42 am

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.

Re: Floaty mana on MAP37 of Hexen

by cocka » Thu Feb 12, 2015 9:29 am

I agree. :)

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 9:28 am

Reverted them all, with the exception of the fog spawner.

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 9:23 am

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!

Re: Floaty mana on MAP37 of Hexen

by Graf Zahl » Thu Feb 12, 2015 9:08 am

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.

Top