QW-Group / mvdsv

MVDSV: a QuakeWorld server
GNU General Public License v2.0
58 stars 56 forks source link

Strange gravity physics after climbing out of fluids #92

Open HangTimeQW opened 2 years ago

HangTimeQW commented 2 years ago

If you are hit by a rocket explosion when climbing out of fluids, the knockback behaves strangely. Your vertical velocity does not get halted by a ceiling so you can 'levitate' against a ceiling rather than falling to the ground.

To reproduce, do a quad rocketjump when climbing out of lava onto a ledge on dm2. Compare with a quad rocketjump from lava when NOT climbing out onto a ledge (this behaves normally).

Demo example attached (first quad rj is 'normal', subsequent quad rjs have the bug): gravbug.zip

tcsabina commented 2 years ago

Hi HT!

I saw the discussion on this on Discord... So the current idea about the bug is this: the server gives the extra damage (which gives an X amount of seconds in the air) to the player, but because the player cannot be pushed up in the air due to the obstacle, the player just 'levitates' till that X amount of seconds the server calculated, expire? Is this something like this?

Toma

HangTimeQW commented 2 years ago

My hypothesis is that the 'climbing out of fluid' code does something strange whereby it prevents vertical (possibly other axes too) velocity from being set to zero when you hit an obstacle. So say you hit the ceiling with a vertical speed of 1000u/sec. Instead of being set to zero, and then going negative due to gravity, I suspect it is just decaying from 1000 based on the gravity acceleration. So it takes some time for it to drop below zero and hence you stay glued to the ceiling.