[UDMF] Linedefs that block hitscans?

Moderator: GZDoom Developers

Post Reply
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

[UDMF] Linedefs that block hitscans?

Post by Nash »

Can we have a linedef flag that blocks hitscans only? "Block everything" seems to block hitscans, so I assume there's already code to block hitscans...
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: [UDMF] Linedefs that block hitscans?

Post by cocka »

I know this request is two years old. But is there a way to set lines blocking hitscans since then? :?:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] Linedefs that block hitscans?

Post by Graf Zahl »

Now there is.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: [UDMF] Linedefs that block hitscans?

Post by cocka »

I've found that:
Added ML_BLOCKHITSCAN line flag.
But how can it be used? Will it be a flag in [wiki]Line_SetBlocking[/wiki] instead of railing or just an acs function or just an udmf property?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] Linedefs that block hitscans?

Post by Graf Zahl »

UDMF property 'blockhitscan' and flag for Line_SetBlocking.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: [UDMF] Linedefs that block hitscans?

Post by Xaser »

A quick question: If combined with the 3DMidtex flag, will the hitscan blocking property apply only to the area occupied by the texture? If so, that'd alleviate a lot of recent mapping headaches (with ZDCMP2 in particular -- we had to use transparent 3D floors as a hackaround!).
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: [UDMF] Linedefs that block hitscans?

Post by cocka »

will the hitscan blocking property apply only to the area occupied by the texture?
I think so. It wouldn't make sense if the whole wall-face blocked the hitscan bulletpuffs. Let alone the projectiles.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] Linedefs that block hitscans?

Post by Graf Zahl »

Xaser wrote:A quick question: If combined with the 3DMidtex flag, will the hitscan blocking property apply only to the area occupied by the texture? If so, that'd alleviate a lot of recent mapping headaches (with ZDCMP2 in particular -- we had to use transparent 3D floors as a hackaround!).
No. That's not how the hitscan trace code works.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: [UDMF] Linedefs that block hitscans?

Post by cocka »

No. That's not how the hitscan trace code works.
OK then, what will be the correct behaviour?
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: [UDMF] Linedefs that block hitscans?

Post by NeuralStunner »

It will presumably block across the entire height of the line, like the other blocking flags.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: [UDMF] Linedefs that block hitscans?

Post by Xaser »

That definitely monkey-wrenches its usefulness -- well, the usefulness of 3DMidtex, really, since the feature gap still persists.

When you say the hitscan trace code "doesn't work" like that, what exactly do you mean? That it doesn't know of 3dMidtex's existence at all? I understand if it needs additional code to even check for that case, at which point support for it is basically a new feature request.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] Linedefs that block hitscans?

Post by Graf Zahl »

The check for 3DMidtex's is done in completely different places than the checks for the other flags. So in order to restrict their effect to the mid texture you'd have to add exclusion code to many, many places and then have to add special checks to the 3DMidtex code. It'll cause more problems than it's really worth.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [UDMF] Linedefs that block hitscans?

Post by DoomRater »

I'm cool with just being able to make a bunker where I can shoot rockets from a platform and I can't be sniped by a chaingun back. This can help tip the power back to projectiles in places where hitscans used to be king.
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: [UDMF] Linedefs that block hitscans?

Post by NeuralStunner »

You can make a +SHOOTABLE object with a low [wiki=Actor_properties#ProjectilePassHeight]ProjectilePassHeight[/wiki]. This will allow rockets/plasma/whatever through, but not hitscans.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”