Open JoGr223 opened 1 month ago
This is a game DLL-specific fix, not an engine fix. Whichever game DLL you use on the server should implement this fix. It won't work online, the server has to be hosting the DLL with said fix.
This is a game DLL-specific fix, not an engine fix. Whichever game DLL you use on the server should implement this fix. It won't work online, the server has to be hosting the DLL with said fix.
so you mean if i want to have it in online matches using OpenTDM servers then it should be implemented in https://github.com/packetflinger/opentdm ? and then there is no problem that q2pro doesn't have it when im playing with q2pro client?
Correct. The weapon firing code runs on the server, not the client; the server already gets your exact view angles (well, near-exact).
The only engine-level "fix" that would be possible would be to offset the crosshair to match the misaligned position, but the offset will depend on the distance of the object being aimed at. This means the crosshair would move around slightly during gameplay (in a manner similar to Serious Sam).
this would be great benefit for online multiplayer especially for non experienced players
Reproduction steps
Expected behavior
rail shot should hit precisely in the center of crosshair
Actual behavior
rail shot hits below crosshair (assuming default cl_y=0; it could be adjusted, but its not a fix cause the problem will always happen at different distance regardless of cl_y) depending on the distance it will be off to a different degree
this is probably known issue present in original quake2, as both Yamagi q2 and Q2RTX has implemented fixes for this, i havent checked how it works there, but i have tested that it works in Quake Live - when you shoot with rail you always hit where your crosshair is; after shot you can even zoom in and see the crosshair still in the center of shot that was just fired and left mark on wall
this is the issue description from Q2RTX: https://github.com/NVIDIA/Q2RTX/issues/274
and here is the code that fixes the problem: https://github.com/NVIDIA/Q2RTX/commit/a50fe3547c17f95537eafd42db14aa83e9efdcc1
perhaps its a matter of copying this code and adapting (as i think the author did from yamagi), i have no experience with q2 source code but i noticed both Q2RTX and Q2PRO have this file p_weapon.c where the fix is implemented
the param introduced to fix:
0
(the default) aiming is slightly inaccurate, bullets and the like have a little drift. When set to1
they hit exactly were the crosshair is.