mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2024-11-10 15:01:48 +00:00
Several fixes
- Don't let Brutal Doom flashlight trigger haptics - Haptic blip on item pickup - Default world scale reduced slightly to 34 - HUD default tweak
This commit is contained in:
parent
7f3ed6be85
commit
d960d4bcf7
7 changed files with 30 additions and 20 deletions
|
@ -864,11 +864,6 @@ void setHMDPosition( float x, float y, float z, float yaw )
|
|||
}
|
||||
}
|
||||
|
||||
bool isMultiplayer()
|
||||
{
|
||||
return false;//Cvar_VariableValue("maxclients") > 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================
|
||||
|
|
|
@ -337,6 +337,8 @@ bool FMugShot::SetState(const char *state_name, bool wait_till_done, bool reset)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
extern "C" void QzDoom_Vibrate(float duration, int channel, float intensity );
|
||||
|
||||
CVAR(Bool,st_oldouch,false,CVAR_ARCHIVE)
|
||||
int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
||||
{
|
||||
|
@ -348,6 +350,10 @@ int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
|
|||
{
|
||||
if (player->bonuscount)
|
||||
{
|
||||
//Short haptic blip on pickup
|
||||
QzDoom_Vibrate(80, 0, 1.0); // left
|
||||
QzDoom_Vibrate(80, 1, 1.0); // right
|
||||
|
||||
SetState("grin", false);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ CVAR(Float, vr_ipd, 0.064f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // METERS
|
|||
CVAR(Float, vr_screendist, 0.80f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // METERS
|
||||
|
||||
// default conversion between (vertical) DOOM units and meters
|
||||
CVAR(Float, vr_vunits_per_meter, 38.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // METERS
|
||||
CVAR(Float, vr_vunits_per_meter, 34.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // METERS
|
||||
CVAR(Float, vr_height_adjust, 0.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // METERS
|
||||
CVAR(Int, vr_control_scheme, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, vr_move_use_offhand, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
@ -68,8 +68,8 @@ CVAR(Int, vr_move_speed, 24, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|||
CVAR(Float, vr_run_multiplier, 1.6, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
//HUD control
|
||||
CVAR(Float, vr_hud_scale, 0.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_hud_stereo, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_hud_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_hud_stereo, 1.8f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_hud_rotate, 35.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, vr_hud_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, vr_hud_fixed_roll, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
|
|
@ -6771,22 +6771,25 @@ AActor *P_SpawnPlayerMissile (AActor *source, double x, double y, double z,
|
|||
MissileActor->Vel3DFromAngle(pitch, MissileActor->Speed);
|
||||
}
|
||||
|
||||
|
||||
//Haptics
|
||||
long rightHanded = vr_control_scheme < 10;
|
||||
QzDoom_Vibrate(150, rightHanded ? 1 : 0, 0.8);
|
||||
if (weaponStabilised)
|
||||
{
|
||||
QzDoom_Vibrate(150, rightHanded ? 0 : 1, 0.6);
|
||||
}
|
||||
|
||||
|
||||
if (MissileActor->flags4 & MF4_SPECTRAL)
|
||||
{
|
||||
MissileActor->SetFriendPlayer(source->player);
|
||||
}
|
||||
|
||||
if (P_CheckMissileSpawn (MissileActor, source->radius))
|
||||
{
|
||||
//Could be the Brutal Doom flashlight!
|
||||
if (MissileActor->DamageType.GetIndex() != 0)
|
||||
{
|
||||
//Haptics
|
||||
long rightHanded = vr_control_scheme < 10;
|
||||
QzDoom_Vibrate(150, rightHanded ? 1 : 0, 0.8);
|
||||
if (weaponStabilised)
|
||||
{
|
||||
QzDoom_Vibrate(150, rightHanded ? 0 : 1, 0.6);
|
||||
}
|
||||
}
|
||||
|
||||
return MissileActor;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -99,6 +99,8 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4])
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
extern "C" void QzDoom_Vibrate(float duration, int channel, float intensity );
|
||||
|
||||
void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int maxpainblend)
|
||||
{
|
||||
int cnt;
|
||||
|
@ -126,6 +128,10 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
|||
{
|
||||
cnt = CPlayer->bonuscount << 3;
|
||||
|
||||
//Super short haptic blip on pickup
|
||||
QzDoom_Vibrate(50, 0, 0.7); // left
|
||||
QzDoom_Vibrate(50, 1, 0.7); // right
|
||||
|
||||
// [SP] Allow player to tone down intensity of pickup flash.
|
||||
cnt = (int)( cnt * pickup_fade_scalar );
|
||||
|
||||
|
|
|
@ -2304,8 +2304,8 @@ OptionMenu VROptionsMenu protected
|
|||
|
||||
StaticText " "
|
||||
Slider "VR HUD Scale", "vr_hud_scale", 0.05, 1.0, 0.05, 2
|
||||
Slider "VR HUD Stereo", "vr_hud_stereo", 0.05, 2.0, 0.05, 2
|
||||
Slider "VR HUD Pitch Rotate", "vr_hud_rotate", 0.0, 50.0, 2.0, 2
|
||||
Slider "VR HUD Stereo", "vr_hud_stereo", 0.0, 3.0, 0.1, 2
|
||||
Slider "VR HUD Pitch Rotate", "vr_hud_rotate", 0.0, 50.0, 1.0, 2
|
||||
Option "VR HUD Fix Pitch", "vr_hud_fixed_pitch", "OnOff"
|
||||
Option "VR HUD Fix Roll", "vr_hud_fixed_roll", "OnOff"
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue