Properly fix the vr_recoil option

- Also added in the laser sight mod with permission courtesy of Alexander Kromm (m8f): https://github.com/mmaulwurff/laser-sight
- Slightly modified the laser sight mod to remove the beam option as this doesn't work correctly in VR
This commit is contained in:
Simon 2020-04-09 10:11:32 +01:00
parent 837d3aa54a
commit 6f371800c7
4 changed files with 19 additions and 14 deletions

View File

@ -415,20 +415,24 @@ class Weapon : StateProvider
action void A_ZoomFactor(double zoom = 1, int flags = 0)
{
let player = self.player;
if (player != NULL && player.ReadyWeapon != NULL)
{
zoom = 1 / clamp(zoom, 0.1, 50.0);
if (flags & 1)
{ // Make the zoom instant.
player.FOV = player.DesiredFOV * zoom;
}
if (flags & 2)
{ // Disable pitch/yaw scaling.
zoom = -zoom;
}
player.ReadyWeapon.FOVScale = zoom;
}
CVar recoil = CVar.FindCVar('vr_recoil');
if (recoil.GetBool())
{
let player = self.player;
if (player != NULL && player.ReadyWeapon != NULL)
{
zoom = 1 / clamp(zoom, 0.1, 50.0);
if (flags & 1)
{ // Make the zoom instant.
player.FOV = player.DesiredFOV * zoom;
}
if (flags & 2)
{ // Disable pitch/yaw scaling.
zoom = -zoom;
}
player.ReadyWeapon.FOVScale = zoom;
}
}
}
//===========================================================================

Binary file not shown.

Binary file not shown.

View File

@ -164,6 +164,7 @@ import android.support.v4.content.ContextCompat;
copy_asset("/sdcard/QuestZDoom", "res/lz_game_support.pk3", true);
copy_asset("/sdcard/QuestZDoom", "res/lights.pk3", true);
copy_asset("/sdcard/QuestZDoom", "res/brightmaps.pk3", true);
copy_asset("/sdcard/QuestZDoom", "mods/laser-sight-0.5.5-vr.pk3", false);
copy_asset("/sdcard/QuestZDoom/audiopack", "snd_fluidsynth/fluidsynth.sf2", false);
//Doom Sharware WAD