Line_fence special

Moderator: GZDoom Developers

Post Reply
Jack
Posts: 17
Joined: Tue May 23, 2006 9:29 am

Line_fence special

Post by Jack »

It would be like that:

Line_fence(height,block_upper,block_lower);

height: height of the fence
block_upper: blocking flags above the height
block_lower: blocking flags below the height

Blocking flags:
0: No blocking
1: Block player
2: Block monsters
4: Block projectiles
User avatar
MartinHowe
Posts: 2097
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

This has been asked for in various forms, including by me. Seconded. Fences are a pain because their visual height in the game bears no relationship to their actual height; with 2-sided textures, this is impossible even then.

This would be useful also for full-height fences as well. Example: in Sapphire, you can shoot through a fence at some spiders, but they can't shoot through it at you.

I would add "8: Block hitscans" also.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

I 'third' this (assuming that even makes sense), then. :P

Since Zdoom already has the code to block lines only up to certain heights (BLOCK_RAILING), would it really be that hard to make this ability non-hardcoded?

Samurai Jack's implementation sounds perfect with the addition of the Block Hitscans as well. However, could we also have a "block middle" parameter as well? Although I assume that with the said implementation the middle texture's blocking settings would be inherited from the existing properties of the line, it would be better if we could have the added flexibility of the flag methods mentioned (so for example, you could have a line block projectiles and hitscans, but allow players to cross).
User avatar
MartinHowe
Posts: 2097
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

So what we're looking at seems to be two specials:

Code: Select all

Line_fence1(height,block_above,block_below);
height: height of the fence
block_above: blocking flags above the height
block_below: blocking flags below the height

Line_fence2(block_upper,block_middle,block_lower);
block_upper: blocking flags for the upper texture
block_middle: blocking flags for the middle texture
block_lower: blocking flags for the lower texture

Blocking flags:
 0: 0x00000000 No blocking
 1: 0x00000001 Block player
 2: 0x00000002 Block monsters
 4: 0x00000004 Block projectiles
 8: 0x00000008 Block hitscans
I suggest also:
-1: 0xFFFFFFFF Default for line type
EDIT: Or for "default", instead of -1, use 0x8000000 and have a "BLOCK_DEFAULT" symbol for it in zdefs.acs.

Incidentally, zdefs.acs already has these (never noticed them before):

Code: Select all

#define BLOCK_NOTHING           0
#define BLOCK_CREATURES         1
#define BLOCK_EVERYTHING        2
#define BLOCK_RAILING           3
What are they used for?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

They are for setting the blocking mode of the line and correspond to the

Block, Block Everything and Railing flags as they exist right now.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

BLOCK_RAILING is a waste if you ask me since it only has a fixed height which you can't change (Thanks to strife).
User avatar
Enjay
 
 
Posts: 27332
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_fence special

Post by Enjay »

Jack wrote:1: Block player
Seeing as how this is mentioned here, I suppose I could do a memory jog to see if my request of a "block players only" could be possible. Reasons why are explained here

http://forum.zdoom.org/potato.php?t=9895
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”