NOTE: THE PK3 ONLY WORKS WITH VANILLA DOOM. TO WORK WITH MODS YOU WILL NEED TO EDIT THE PLAYER'S CODE.
REQUIRES GZDOOM 3.8.0 OR HIGHER. FEEL FREE TO USE TO YOUR LIKING, JUST WRITE SOMEWHERE I WAS THE ORIGINAL CREATOR
An only mildly hacky way to force Quake-like wall friction onto player movement.
What is Quake-like wall friction?
When you touch a wall your velocity is not decimated but is perfectly redirected along the impact surface.
This works on the same concept of the wallslide I coded for ZMovement, which is: GZDoom's P_SlideMove correctly changes the direction player is moving to slide along the wall, but during the process it more or less significantly decreases the player speed.
So all we need to do is keep the velocity vector direction but apply a different length to it.
The mod works around two editable values:
IMPACT_ANGLE_TOLERANCE, if the dot product of the velocity before and after impact is higher than this value the new velocity will not be demultiplied, otherwise it will be proportionally scaled. Edit the const value keeping in mind that: if VelDot is 1 (impossible) the direction of the old and new velocity is the same, 0.5 it means the impacting angle was 45, 0 the angle is 90.
FORCED_VELOCITY_TICS, how many tics velocity length is forced onto the player. 2 works best, but 1 is totally fine if you have a player that moves at regular DoomGuy's (or slower) speed.
Code: Select all
Changelog 1.1:
Slightly changed meaning of const IMPACT_ANGLE_TOLERANCE and added scaling multiplier if the impacting angle is too steep.
Warning: they are extremely lame. Only watch if you cannot live without doing so
This will eventually be added to ZMovement 3.2, but since the release of this one is not imminent in the meantime I am putting it here in case it is interests anybody.
DOWNLOAD HERE
Code for people who don't want to download the pk3.
Spoiler:

