When a player releases the "crouch" key, `Player::TryUncrouch` is
responsible for checking if uncrouching is possible and adjusting the
local player position accordingly so that the legs won't be embedded in
a ground thereafter. There are two cases in which uncrouching succeeds.
Case 1: The player is airborne, and there's room under the legs. Case 2:
There's room over the head.
The old code did not rely on `Player::TryUncrouch` for player position
readjustment. Instead, `Player::SetInput` was actually responsible for
this. Unfortunately, it did not distinguish the cases correctly. It did
check correctly whether uncrouching is possible. However, to determine
which of Case 1 and Case 2 is applicable, it only checked the player's
airborne-ness, therefore it incorrectly selected Case 1 if the player is
airborne but there's no room under the legs. This incorrect
implementation resulted in annoying bugs where a player gets stuck in a
ground if the player uncrouches just above it.
Improves the smoothness of non-local player movement in a server that
sends ten WorldUpdate packages for each second (i.e., 10 updates per
second).
I wouldn't dare to relax the bound further since this technique is
extremely susceptible to jitter. The server sending WorldUpdate packets
with `PACKET_FLAG_UNSEQUENCED` isn't exactly helping since that
introduces discontinuity into the received position stream, and the
denominator lower bound is the only thing that keeps the estimation from
exploding. (The packets should really be unreliable + sequenced.)
This commit updates the enet version from 2013 !!! to the latest commit (74cea7abf52ddd355146aeb0a4077d2b95368122)
Since 2013 there have been MANY improvements to the library
and we should absolutely use them since it can improve the gameplay.
This commit completely disables any sign of recoil if
the packet is coming from a player that is not local
player.
We want to apply recoil to local player weapon
but we do not want to apply it to others as
we just want to display what was given to us
(Their client already adds recoil. If not they
are cheating)
Volumetric Fog Level 2
> This PR adds a new volumetric fog implementation, which can be selected by `r_fogShadow 2`.
>
> * The new implementation calculates the fog density in the same way as the original client does (#409).
>
> * The influence factors of shadow casters are weighted according to their distances to the camera. Shadows don't "pop up" like they do in the Level 1 implementation.
>
> * It's significantly more demanding compared to the Level 1 implementation but not as much as current-gen games.
>
> * It supports global illumination. (The non-GI path is unimplemented, so it'll fall back to Level 1 if GI is disabled.)
>
> * Being implemented by naive ray marching, its code is much simpler compared to the Level 1 one.
When built from master, Openspades would crash at startup with the
following error:
```
Error while linking a program: 'Shaders/BasicBlock.program'
error: unresolved reference to function 'PrepareForRadiosityForMap_Map'
```
The culprit was said function's definition in `MapRadiosityNull.vs`
which was missing a parameter. Fixes#944