DarkPlacesEngine / DarkPlaces

The DarkPlaces Quake engine, created by LadyHavoc. Official Git repository (replaces SVN).
https://icculus.org/twilight/darkplaces/
GNU General Public License v2.0
286 stars 40 forks source link

Player velocity_z is positive when falling #157

Closed hemebond closed 7 months ago

hemebond commented 7 months ago

Trying to fix bugs in the Zerstorer mod, I found that DarkPlaces has the opposite behaviour to other engines and it appears to be because velocity_z is positive when the player is falling, whereas other engines it's negative.

e.g., debug output from Ironwail/QuakeSpasm

Modifying velocity_z from -154.7 to -143.9

And the same debug output from DarkPlaces

Modifying velocity_z from 122.499985 to 133.194427

Because the code assumes it will be negative

other.velocity_z = other.velocity_z + (self.delay * frametime);
bones-was-here commented 7 months ago

No... in unmodified id1 Quake and in Xonotic, velocity_z is negative when the player is falling, and becomes increasingly negative with each frame of gravity that's applied.

]slowmo 0.05
]prvm_edictget server 1 velocity
12.3303385 -78.0110321 -318.617218
]prvm_edictget server 1 velocity
12.3303385 -78.0110321 -399.726562
]prvm_edictget server 1 velocity
16.9995594 -78.8069305 -424.726562