Skip to content

Remove shot origin compression and allow for negative depth offsets for shot origin

Dr. Jaska requested to merge drjaska/shootfromnegativex into master

Follow up to !1215 (merged)

Before this patch all of the offsets were checked that if x-axis was negative then the whole vector was overridden to '0 0 0'. This removes that check from all the places I could find myself and improves accuracy by using uncompressed shot origins. AFAIK removing the compression was mandatory for signed values to properly transfer.

This does affect almost all origins of all shots but only extremely minorly.

Some g_shootfromeye 1 uncompressed movedirs of weapons compared to compressed ones:

-offset of tuba: 28.5 0 0
+offset of tuba: 28.4467 0 0
-offset of blaster: 23 0 0
+offset of blaster: 22.8658 0 0
-offset of shockwave: 31.5 0 0
+offset of shockwave: 31.381 0 0
-offset of shotgun: 31.5 0 0
+offset of shotgun: 31.381 0 0
-offset of arc: 31.5 0 0
+offset of arc: 31.381 0 0
-offset of machinegun: 28.5 0 0
+offset of machinegun: 28.4467 0 0
-offset of mortar: 37.5 0 0
+offset of mortar: 37.4478 0 0
-offset of electro: 55.5 0 0
+offset of electro: 55.6123 0 0
-offset of crylink: 55.5 0 0
+offset of crylink: 55.5029 0 0
-offset of vortex: 43 0 0
+offset of vortex: 43.0039 0 0
-offset of vaporizer: 41.5 0 0
+offset of vaporizer: 41.46 0 0
-offset of hagar: 25 0 0
+offset of hagar: 25.0649 0 0
+offset of fireball: 55.9777 0 0
-offset of fireball: 56 0 0
+offset of devastator: 41.8322 0 0
-offset of devastator: 42 0 0
+offset of porto: 19.6067 0 0
-offset of porto: 19.5 0 0
+offset of hook: 18.3501 0 0
-offset of hook: 18.5 0 0
 off-hand hook is always 8 8 -12

For most of the weapons there will not be any notable change, at least out of the ones I tested with give all.

Edited by Dr. Jaska

Merge request reports