Fixes the BFG (now as devastating as it was before)
Many cvar defaults courtesy of VR_Bummser
This commit is contained in:
Simon 2020-05-03 21:13:37 +01:00
parent ba2e853411
commit 97906c50d1
19 changed files with 55 additions and 34 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.questzdoom"
android:versionCode="12"
android:versionName="0.5.5" android:installLocation="auto" >
android:versionCode="13"
android:versionName="0.6.0" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View File

@ -1288,7 +1288,7 @@ void VR_Init()
remote_movementUp = 0.0f;
positional_movementSideways = 0.0f;
positional_movementForward = 0.0f;
snapTurn = 90.0f; // start partly turned
snapTurn = 0.0f; // start partly turned
//init randomiser
srand(time(NULL));

View File

@ -1505,8 +1505,11 @@ public:
//For VR, override firing position - Thank-you Fishbiter for this code!!
bool OverrideAttackPosDir;
DVector3 AttackPos;
//DVector3 AttackDir;
DAngle AttackPitch;
DAngle AttackAngle;
DVector3 (*AttackDir)(AActor* actor, DAngle yaw, DAngle pitch);
};

View File

@ -148,7 +148,7 @@ static char *work = NULL;
static int worklen = 0;
CVAR(Float, con_notifytime, 3.f, CVAR_ARCHIVE)
CVAR(Bool, con_centernotify, false, CVAR_ARCHIVE)
CVAR(Bool, con_centernotify, true, CVAR_ARCHIVE)
CUSTOM_CVAR(Int, con_scaletext, 0, CVAR_ARCHIVE) // Scale notify text at high resolutions?
{
if (self < 0) self = 0;

View File

@ -150,7 +150,7 @@ CUSTOM_CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE | CVAR_NOINITC
GLRenderer->ClearTonemapPalette();
}
CVAR(Float, gl_menu_blur, -1.0f, CVAR_ARCHIVE)
CVAR(Float, gl_menu_blur, 0.0f, CVAR_ARCHIVE)
EXTERN_CVAR(Float, vid_brightness)
EXTERN_CVAR(Float, vid_contrast)

View File

@ -370,7 +370,6 @@ namespace s3d
DVector3 direction = { pc * yaw.Cos(), pc * yaw.Sin(), -pitch.Sin() };
return direction;
}
double pc = pitch.Cos();
yaw -= actor->Angles.Yaw;
@ -378,7 +377,7 @@ namespace s3d
//pitch -= actor->Angles.Pitch;
pitch.Degrees = 0;
pc = pitch.Cos();
double pc = pitch.Cos();
LSVec3 local = { (float)(pc * yaw.Cos()), (float)(pc * yaw.Sin()), (float)(-pitch.Sin()), 0.0f };
@ -473,6 +472,9 @@ namespace s3d
{
player->mo->OverrideAttackPosDir = true;
player->mo->AttackPitch = -weaponangles[PITCH];
player->mo->AttackAngle = -90 + (doomYaw - hmdorientation[YAW]) + weaponangles[YAW];
player->mo->AttackPos.X = player->mo->X() - (weaponoffset[0] * vr_vunits_per_meter);
player->mo->AttackPos.Y = player->mo->Y() - (weaponoffset[2] * vr_vunits_per_meter);
player->mo->AttackPos.Z = player->mo->Z() + (((hmdPosition[1] + weaponoffset[1] + vr_height_adjust) * vr_vunits_per_meter) / pixelstretch);

View File

@ -64,15 +64,15 @@ CVAR(Bool, vr_teleport, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_weaponRotate, -30, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_weaponScale, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_snapTurn, 45.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Int, vr_move_speed, 24, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_run_multiplier, 1.6, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Int, vr_move_speed, 19, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_run_multiplier, 1.5, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_switch_sticks, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_pickup_haptic_level, 0.2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_quake_haptic_level, 0.8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
//HUD control
CVAR(Float, vr_hud_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_scale, 0.25f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_stereo, 1.4f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_rotate, 10.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_pitch, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

View File

@ -66,7 +66,7 @@ void gl_PrintStartupLog();
extern bool vid_hdr_active;
CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
CUSTOM_CVAR(Int, vid_hwgamma, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) //Defaulted off for VR
{
if (self < 0 || self > 2) self = 2;
if (GLRenderer != NULL && GLRenderer->framebuffer != NULL) GLRenderer->framebuffer->DoSetGamma();

View File

@ -71,7 +71,7 @@ CUSTOM_CVAR (Float, vid_contrast, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
}
}
CUSTOM_CVAR (Float, vid_saturation, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CUSTOM_CVAR (Float, vid_saturation, 1.2f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) //Defaulted for VR
{
if (screen != NULL)
{

View File

@ -66,7 +66,7 @@ int DMenu::InMenu;
// Todo: Move these elsewhere
//
CVAR (Float, mouse_sensitivity, 1.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CVAR (Bool, show_messages, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // Defaulted to off for VR
CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
CVAR (Int, m_showinputgrid, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, m_blockcontrollers, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

View File

@ -130,7 +130,7 @@ void P_InitParticles ();
// [BC] Allow the maximum number of particles to be specified by a cvar (so people
// with lots of nice hardware can have lots of particles!).
CUSTOM_CVAR( Int, r_maxparticles, 4000, CVAR_ARCHIVE )
CUSTOM_CVAR( Int, r_maxparticles, 100, CVAR_ARCHIVE ) //Default to min for VR
{
if ( self == 0 )
self = 4000;

View File

@ -4179,7 +4179,7 @@ struct aim_t
}
else continue; // shot over the thing
}
continue; // shot under the thing
else continue; // shot under the thing
}
if (crossedffloors)
@ -4314,17 +4314,27 @@ DAngle P_AimLineAttack(AActor *t1, DAngle angle, double distance, FTranslatedLin
aim_t aim;
DVector3 pos = t1->Pos();
DAngle attackPitch = t1->Angles.Pitch;
DAngle attackAngle = angle;
if (t1->player != nullptr && t1->player->mo->OverrideAttackPosDir)
{
pos = t1->player->mo->AttackPos;
attackPitch = t1->player->mo->AttackPitch;
attackAngle = t1->player->mo->AttackAngle + (angle - t1->Angles.Yaw);
}
aim.flags = flags;
aim.shootthing = t1;
aim.friender = (friender == NULL) ? t1 : friender;
aim.friender = (friender == nullptr) ? t1 : friender;
aim.aimdir = aim_t::aim_up | aim_t::aim_down;
aim.startpos = t1->Pos();
aim.aimtrace = angle.ToVector(distance);
aim.startpos = pos;
aim.aimtrace = attackAngle.ToVector(distance);
aim.limitz = aim.shootz = shootz;
aim.toppitch = t1->Angles.Pitch - vrange;
aim.bottompitch = t1->Angles.Pitch + vrange;
aim.toppitch = attackPitch - vrange;
aim.bottompitch = attackPitch + vrange;
aim.attackrange = distance;
aim.aimpitch = t1->Angles.Pitch;
aim.aimpitch = attackPitch;
aim.lastsector = t1->Sector;
aim.startfrac = 0;
aim.unlinked = false;
@ -4338,7 +4348,13 @@ DAngle P_AimLineAttack(AActor *t1, DAngle angle, double distance, FTranslatedLin
{
*pLineTarget = *result;
}
return result->linetarget ? result->pitch : t1->Angles.Pitch;
if (result->linetarget)
{
return result->pitch;
}
return t1->Angles.Pitch;
}
//==========================================================================

View File

@ -50,7 +50,7 @@
static FRandom pr_teleport ("Teleport");
CVAR (Bool, telezoom, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
CVAR (Bool, telezoom, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); // Default to off for VR
//==========================================================================
//

View File

@ -105,7 +105,7 @@ CVAR (Bool, r_deathcamera, false, CVAR_ARCHIVE)
CVAR (Int, r_clearbuffer, 0, 0)
CVAR (Bool, r_drawvoxels, true, 0)
CVAR (Bool, r_drawplayersprites, true, 0) // [RH] Draw player sprites?
CVAR(Int, r_PlayerSprites3DMode, 0, CVAR_ARCHIVE);
CVAR(Int, r_PlayerSprites3DMode, 1, CVAR_ARCHIVE); // Back only as default
CVAR(Float, gl_fatItemWidth, 0.5f, CVAR_ARCHIVE);
CUSTOM_CVAR(Float, r_quakeintensity, 0.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // Defaulted to 0 for VR
{

View File

@ -111,7 +111,7 @@ float saved_relative_volume = 1.0f; // this could be used to implement an ACS Fa
// Maximum volume of MOD/stream music.
//==========================================================================
CUSTOM_CVAR (Float, snd_musicvolume, 0.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CUSTOM_CVAR (Float, snd_musicvolume, 0.6f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
{
if (self < 0.f)
self = 0.f;

View File

@ -195,7 +195,7 @@ CUSTOM_CVAR (Int, vid_refreshrate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
}
}
CUSTOM_CVAR (Float, dimamount, -1.f, CVAR_ARCHIVE)
CUSTOM_CVAR (Float, dimamount, 0.f, CVAR_ARCHIVE)
{
if (self < 0.f && self != -1.f)
{

View File

@ -41,7 +41,7 @@ const char *GetVersionString();
/** Lots of different version numbers **/
#define VERSIONSTR "DrBeef's QuestZDoom-0.5.5 (LZDoom 3.83a)"
#define VERSIONSTR "DrBeef's QuestZDoom-0.6.0 (LZDoom 3.83a)"
// The version as seen in the Windows resource
#define RC_FILEVERSION 3,83,1

View File

@ -191,19 +191,19 @@ extend class Actor
{
//
// A_BFGSpray
// Spawn a BFG explosion on every monster in view
// Spawn a BFG explosion on every monster in 360 arc of detonating missile
//
void A_BFGSpray(class<Actor> spraytype = "BFGExtra", int numrays = 40, int damagecnt = 15, double ang = 90, double distance = 16*64, double vrange = 32, int defdamage = 0, int flags = 0)
void A_BFGSpray(class<Actor> spraytype = "BFGExtra", int numrays = 160, int damagecnt = 15, double ang = 360, double distance = 12*64, double vrange = 45, int defdamage = 0, int flags = BFGF_MISSILEORIGIN)
{
int damage;
FTranslatedLineTarget t;
// validate parameters
if (spraytype == null) spraytype = "BFGExtra";
if (numrays <= 0) numrays = 40;
if (numrays <= 0) numrays = 140;
if (damagecnt <= 0) damagecnt = 15;
if (ang == 0) ang = 90.;
if (distance <= 0) distance = 16 * 64;
if (ang == 0) ang = 360.;
if (distance <= 0) distance = 10 * 64;
if (vrange == 0) vrange = 32.;
// [RH] Don't crash if no target
@ -216,7 +216,7 @@ extend class Actor
// offset angles from its attack ang
for (int i = 0; i < numrays; i++)
{
double an = angle - ang / 2 + ang / numrays*i;
double an = angle - ang / 2 + ((ang / numrays) * i);
originator.AimLineAttack(an, distance, t, vrange);

Binary file not shown.