Page 1 of 1

I swear it's been done...lower viewheight in water?

PostPosted: Mon Apr 05, 2021 4:47 pm
by rabidrage
I can't find or recall what mod it was in, but I swear there was one where your viewheight would be reduced if you were standing on a liquid texture, like you were actually standing in a deep liquid. I've studied the Terrain lump and the wiki, but I don't know how to implement it. Does anybody know how to do this?

Re: I swear it's been done...lower viewheight in water?

PostPosted: Mon Apr 05, 2021 11:09 pm
by Jarewill
TERRAIN lump is the way to do this. footclip property to be exact:
Code: Select allExpand view
terrain WaterClip //Define the terrain type
{
    footclip        12 //You can change 12 to any value you want
}
floor FWATER1 WaterClip Then you have to assign this value to all liquid flats, this only covers the liquid flats
floor FWATER2 WaterClip
floor FWATER3 WaterClip
floor FWATER4 WaterClip

Then you have to give the player the FLOORCLIP flag.
If you don't want to modify the player class, you can use a script to do it:
Code: Select allExpand view
Script "AssignFloorClip" ENTER
{
    SetActorFlag(0,"FLOORCLIP",1);
}

Re: I swear it's been done...lower viewheight in water?

PostPosted: Tue Apr 06, 2021 4:01 pm
by rabidrage
Sounds like a lot if you're using the PBR liquids patch. Still, it'll be worth it. Thank you!

Re: I swear it's been done...lower viewheight in water?

PostPosted: Tue Apr 06, 2021 4:09 pm
by rabidrage
Okay, only thing is that it's coming up saying "unknown keyword 'floor'".

Re: I swear it's been done...lower viewheight in water?

PostPosted: Tue Apr 06, 2021 11:41 pm
by Jarewill
That's weird.
Could you show how you did it?
Is it in the TERRAIN lump?

I realised I somehow forgot to comment out the text after the first floor, it has to be removed if it was copied alongside the rest.

Re: I swear it's been done...lower viewheight in water?

PostPosted: Wed Apr 07, 2021 2:54 pm
by rabidrage
Actually, I finally got it to work (or realized it was working, but very subtly). Not sure I get it entirely, but the version of the Terrain lump I have comes from a mod that includes it in both a lump in the PK3 and a lump in a WAD in the same PK3. They work together, kind of. It's weird.