DSprtn / GTFO_VR_Plugin

A plugin to add full roomscale Virtual Reality support to your favorite game!
MIT License
143 stars 13 forks source link

Fix R8 issues #58

Closed Nordskog closed 7 months ago

Nordskog commented 7 months ago

Fix various issues introduced in R8

Pistols incorrectly set to two-hand

There was a copy-pasta incident in the past where one of the pistols was incorrectly configured to be two-handed. Turns out this affected some other pistols too, namely the MASTABA R66 (Revolver) and the Shelling Arid 5 (High Caliber Pistol). These entries have been corrected, and all remaining weapons added to the list.

New melee weapons offset

All the new melee weapons use existing archtypes ( sledgehammer, knife, baton ), and have roughly the same shape as existing weapons. However, Archtypes names are only used when positioning the hitboxes, while the positional offset of the weapon is determined by its VRWeaponData entry in WeaponArchtypeVRData.cs, which is per-weapon. Copy-pasta'd existing entries for new weapons, problem solved.

Drekker CLR misaligned sight

The Drekker CLR suffers from the same misaligned muzzle problem as the Accrat ND6 Heavy SMG, and the fix is the same. See https://github.com/DSprtn/GTFO_VR_Plugin/pull/49 for details on that.

Bataldo Custom K33 missing sight

The sight on this shotgun is only visible when viewed from the front of the gun, as if the normals are inverted and backface culling enabled. I don't see any options in the shader to tweak the culling behavior, so rotating the holographic portion of the sight 180 is the obvious solution. Doing this the sight is zeroed correctly, and the way the 3 crosshairs aligns suggest this is in fact the correct alignment. Good enough in any case. jjk9yzG

fixCenteredCrosshairTexture NPE

This method is responsible for dealing with the crosshair texture of the Techman Arbalist, which needs to be cropped in order to be centered properly. For some reason it gets called multiple times for the same material, and on the first call the texture is empty. Didn't break anything, but return early if texture is null now.

DSprtn commented 7 months ago

Great work!