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:
parent
837d3aa54a
commit
6f371800c7
|
@ -415,20 +415,24 @@ class Weapon : StateProvider
|
||||||
|
|
||||||
action void A_ZoomFactor(double zoom = 1, int flags = 0)
|
action void A_ZoomFactor(double zoom = 1, int flags = 0)
|
||||||
{
|
{
|
||||||
let player = self.player;
|
CVar recoil = CVar.FindCVar('vr_recoil');
|
||||||
if (player != NULL && player.ReadyWeapon != NULL)
|
if (recoil.GetBool())
|
||||||
{
|
{
|
||||||
zoom = 1 / clamp(zoom, 0.1, 50.0);
|
let player = self.player;
|
||||||
if (flags & 1)
|
if (player != NULL && player.ReadyWeapon != NULL)
|
||||||
{ // Make the zoom instant.
|
{
|
||||||
player.FOV = player.DesiredFOV * zoom;
|
zoom = 1 / clamp(zoom, 0.1, 50.0);
|
||||||
}
|
if (flags & 1)
|
||||||
if (flags & 2)
|
{ // Make the zoom instant.
|
||||||
{ // Disable pitch/yaw scaling.
|
player.FOV = player.DesiredFOV * zoom;
|
||||||
zoom = -zoom;
|
}
|
||||||
}
|
if (flags & 2)
|
||||||
player.ReadyWeapon.FOVScale = zoom;
|
{ // Disable pitch/yaw scaling.
|
||||||
}
|
zoom = -zoom;
|
||||||
|
}
|
||||||
|
player.ReadyWeapon.FOVScale = zoom;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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/lz_game_support.pk3", true);
|
||||||
copy_asset("/sdcard/QuestZDoom", "res/lights.pk3", true);
|
copy_asset("/sdcard/QuestZDoom", "res/lights.pk3", true);
|
||||||
copy_asset("/sdcard/QuestZDoom", "res/brightmaps.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);
|
copy_asset("/sdcard/QuestZDoom/audiopack", "snd_fluidsynth/fluidsynth.sf2", false);
|
||||||
|
|
||||||
//Doom Sharware WAD
|
//Doom Sharware WAD
|
||||||
|
|
Loading…
Reference in New Issue