[r2138-g337682]Plane misalignments in a zombie horde map
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.
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.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
[r2138-g337682]Plane misalignments in a zombie horde map
See this zandronum ticket.
Download and open zh-mappack10.pk3, extract ze15.wad outside and run it with zdoom (it's too big, so I can't attach it).
After the mentioned revision (r2138), if you open map 'ze15' (apart from the tons of texture errors), some areas changed the aspect, for example some planes were moved down, and also if you check coordinates (5300,-1300), the boat area has become too steep, while before it was completely horizontal. See the screenshots from that ticket in the 'Additional information' section, which come from the complete load of the needed wads.
I don't know exactly why this happens, but somehow the Plane_Align change strikes back again.
Download and open zh-mappack10.pk3, extract ze15.wad outside and run it with zdoom (it's too big, so I can't attach it).
After the mentioned revision (r2138), if you open map 'ze15' (apart from the tons of texture errors), some areas changed the aspect, for example some planes were moved down, and also if you check coordinates (5300,-1300), the boat area has become too steep, while before it was completely horizontal. See the screenshots from that ticket in the 'Additional information' section, which come from the complete load of the needed wads.
I don't know exactly why this happens, but somehow the Plane_Align change strikes back again.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Yes, same cause. They used a 'slope floor to here' thing with a line ID of 0.
Re: [r2138-g337682]Plane misalignments in a zombie horde map
ehm, why does in hexen format there's a Set Line ID 0 and in udmf format no? maybe since this map is really old, when it was made there was no Set Line ID argument?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
In UDMF line IDs are set directly on the linedef, not through some specials. All line ID setting args have been disabled in UDMF.
The problem here comes from the fact that the default line ID is not 0, as one might expect but -1. But with the specials that can set it, -1 cannot be specified as a byte so this makes line ID 0 mostly unusable.
These broken maps are caused by an old bug in the Plane_Align special which discarded its line ID. This has been fixed in ZDoom many, many years ago. But Skulltag and Zandronum have neglected to update their code base for far too long, so this bug could rot in their code and attract some mappers doing stuff wrong.
The problem here comes from the fact that the default line ID is not 0, as one might expect but -1. But with the specials that can set it, -1 cannot be specified as a byte so this makes line ID 0 mostly unusable.
These broken maps are caused by an old bug in the Plane_Align special which discarded its line ID. This has been fixed in ZDoom many, many years ago. But Skulltag and Zandronum have neglected to update their code base for far too long, so this bug could rot in their code and attract some mappers doing stuff wrong.
Re: [r2138-g337682]Plane misalignments in a zombie horde map
OFF:Well, since it's broken, gzdoom builder may need an update since on "gzdoom" 3D mode it shows the "right" (wrong) way about how this should look...
Well I would ask if converting this map to udmf would fix the problem, but since all the tool that I tested/compiled, just failed to make a proper .wad file '-'
Well I would ask if converting this map to udmf would fix the problem, but since all the tool that I tested/compiled, just failed to make a proper .wad file '-'
Re: [r2138-g337682]Plane misalignments in a zombie horde map
I think that the fix could be fairly easy: Find all linedefs with 181:Plane_Align special and set the third argument to some nonzero value (or more precisely, to some unused Line ID number), for example 255.
But I found a discrepancy on ZDoom wiki (http://zdoom.org/wiki/Plane_Align):
But I found a discrepancy on ZDoom wiki (http://zdoom.org/wiki/Plane_Align):
That actually means: "If the lineid argument is 0, then it should not set Line ID at all". WHY ZDoom does not behave like this? If it behaved this way, then there would never be such problems.lineid: also sets this line's id if non-zero. Obsolete in UDMF.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
I have no idea where that info comes from. The code for Plane_Align is exactly the same as for all other line ID setting specials.
Furthermore, the problems are only in Zandronum maps as the current ZDoom behavior is quite old. Wrong or not, there's very little incentive to change it in ZDoom. Line ID 0 is useless anyway if one of the other affected specials is being used.
Furthermore, the problems are only in Zandronum maps as the current ZDoom behavior is quite old. Wrong or not, there's very little incentive to change it in ZDoom. Line ID 0 is useless anyway if one of the other affected specials is being used.
Re: [r2138-g337682]Plane misalignments in a zombie horde map
So can this information be fixed on ZDoom Wiki? I found this mistake also in http://zdoom.org/wiki/Polyobj_StartLine and it's most probably wrong in all lineid-setting specials.
Also may I ask why default lineid is -1 instead of 0? For sectors and things, their default tags are 0 anyway.
Also may I ask why default lineid is -1 instead of 0? For sectors and things, their default tags are 0 anyway.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
You have to ask Raven for that. Apparently they thought differently than id about the default.
About the specials, I wonder if some map is lurking out there that actually uses line ID 0 properly and would break by making a 0 parameter for all specials other than Line_SetIdentification and Teleport_Line no-op or if there is a slim chance of finding the one odd map that somehow managed to abuse this quirk.
About the specials, I wonder if some map is lurking out there that actually uses line ID 0 properly and would break by making a 0 parameter for all specials other than Line_SetIdentification and Teleport_Line no-op or if there is a slim chance of finding the one odd map that somehow managed to abuse this quirk.
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Yes, they exist. The default line ID used to be 0. Then some Hexen maps got pointed out as broken, so I checked and they used line ID 0 as a legitimate ID so I had to change the default to something Line_SetIdentification could not specify.
Oh, i think I misread your post. Making 0 a no-op for anything that couldn't set a line ID in vanilla Hexen is probably not a bad idea.
Oh, i think I misread your post. Making 0 a no-op for anything that couldn't set a line ID in vanilla Hexen is probably not a bad idea.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
From what I have seen, Line_SetIdentification and Teleport_Line must support 0, the latter was also reported for a Zandronum map, and is the most likely one where 0 was accidentally used. For all the others I think making a 0-arg a no-op should be ok, especially those specials where the capability was added relatively late.
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Can you clarify, are all plane_align functions now requiring their lineid parameter (which according the wiki is ignored if 0) to be greater than zero?
Because that's nuts if true, that parameter is almost never set by anyone. I suspect almost all cases of plane_align would have to be changed if that's the case.
Because that's nuts if true, that parameter is almost never set by anyone. I suspect almost all cases of plane_align would have to be changed if that's the case.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Read more carefully before panicking
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Jroc: definitely not.
Plane_align now has a possibility to set line ID. If the lineid parameter is zero, then the line ID is set to 0. The problem is, if a mapper previously used Line ID 0 for a valid action, then the lines with plane_align now all have Line ID 0 which results in unwanted side effects. In 99.9% of existing maps where Line ID 0 is NOT used for anything, you don't really need to change anything.
Plane_align now has a possibility to set line ID. If the lineid parameter is zero, then the line ID is set to 0. The problem is, if a mapper previously used Line ID 0 for a valid action, then the lines with plane_align now all have Line ID 0 which results in unwanted side effects. In 99.9% of existing maps where Line ID 0 is NOT used for anything, you don't really need to change anything.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2138-g337682]Plane misalignments in a zombie horde map
Moreover, the current behavior has been present for several years now in ZDoom - all maps that are affected by it are for Skulltag or Zandronum, if there was some old ZDoom map out in the wild depending on line ID 0 it'd long have been found by now.
Keep in mind that this only affects ZDoom(Hexen format) maps with slopes and no translucent lines made between 2002 and 2008. Anything else would have manifested glitches right out of the box. The interesting thing is, that both maps that got reported for this has the line ID 0 access more or less by accident: one used an untagged slope thing that didn't reference anything, the other had an incompletely set up line to line teleporter. In both cases there was no deliberate use of line ID 0.
Keep in mind that this only affects ZDoom(Hexen format) maps with slopes and no translucent lines made between 2002 and 2008. Anything else would have manifested glitches right out of the box. The interesting thing is, that both maps that got reported for this has the line ID 0 access more or less by accident: one used an untagged slope thing that didn't reference anything, the other had an incompletely set up line to line teleporter. In both cases there was no deliberate use of line ID 0.