mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2024-11-10 15:01:48 +00:00
Weapon Scale cvar now applies to Models too
..and added finer control of the mouse in the Total Chaos inventory
This commit is contained in:
parent
e4d64f9b9f
commit
7b667e72b2
5 changed files with 13 additions and 15 deletions
|
@ -69,20 +69,14 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
}
|
||||
|
||||
//In cinema mode, right-stick controls mouse
|
||||
const float mouseSpeed = 2.0f;
|
||||
const float mouseSpeed = 3.0f;
|
||||
if (cinemamode)
|
||||
{
|
||||
if (pPrimaryTrackedRemoteNew->Joystick.x > 0.6f) {
|
||||
cinemamodeYaw -= mouseSpeed;
|
||||
if (fabs(pPrimaryTrackedRemoteNew->Joystick.x) > 0.1f) {
|
||||
cinemamodeYaw -= mouseSpeed * pPrimaryTrackedRemoteNew->Joystick.x;
|
||||
}
|
||||
if (pPrimaryTrackedRemoteNew->Joystick.x < -0.6f) {
|
||||
cinemamodeYaw += mouseSpeed;
|
||||
}
|
||||
if (pPrimaryTrackedRemoteNew->Joystick.y > 0.6f) {
|
||||
cinemamodePitch -= mouseSpeed;
|
||||
}
|
||||
if (pPrimaryTrackedRemoteNew->Joystick.y < -0.6f) {
|
||||
cinemamodePitch += mouseSpeed;
|
||||
if (fabs(pPrimaryTrackedRemoteNew->Joystick.y) > 0.1f) {
|
||||
cinemamodePitch -= mouseSpeed * pPrimaryTrackedRemoteNew->Joystick.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ namespace s3d
|
|||
|
||||
if (cinemamode)
|
||||
{
|
||||
mat->rotate(-90 + r_viewpoint.Angles.Yaw.Degrees + (weaponangles[YAW]- hmdorientation[YAW]), 0, 1, 0);
|
||||
mat->rotate(-90 + r_viewpoint.Angles.Yaw.Degrees + (weaponangles[YAW]- playerYaw), 0, 1, 0);
|
||||
mat->rotate(-weaponangles[PITCH] - r_viewpoint.Angles.Pitch.Degrees, 1, 0, 0);
|
||||
} else {
|
||||
mat->rotate(-90 + doomYaw + (weaponangles[YAW]- hmdorientation[YAW]), 0, 1, 0);
|
||||
|
@ -341,7 +341,7 @@ namespace s3d
|
|||
|
||||
if (cinemamode)
|
||||
{
|
||||
mat->rotate(-90 + r_viewpoint.Angles.Yaw.Degrees + (offhandangles[YAW]- hmdorientation[YAW]), 0, 1, 0);
|
||||
mat->rotate(-90 + r_viewpoint.Angles.Yaw.Degrees + (offhandangles[YAW]- playerYaw), 0, 1, 0);
|
||||
mat->rotate(-offhandangles[PITCH] - r_viewpoint.Angles.Pitch.Degrees, 1, 0, 0);
|
||||
} else {
|
||||
mat->rotate(-90 + doomYaw + (offhandangles[YAW]- hmdorientation[YAW]), 0, 1, 0);
|
||||
|
@ -500,7 +500,7 @@ namespace s3d
|
|||
player->mo->AttackPitch = cinemamode ? -weaponangles[PITCH] - r_viewpoint.Angles.Pitch.Degrees
|
||||
: -weaponangles[PITCH];
|
||||
|
||||
player->mo->AttackAngle = -90 + getViewpointYaw() + (weaponangles[YAW]- hmdorientation[YAW]);
|
||||
player->mo->AttackAngle = -90 + getViewpointYaw() + (weaponangles[YAW]- playerYaw);
|
||||
|
||||
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);
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
CVAR(Bool, gl_interpolate_model_frames, true, CVAR_ARCHIVE)
|
||||
EXTERN_CVAR(Bool, r_drawvoxels)
|
||||
EXTERN_CVAR(Int, vr_control_scheme)
|
||||
EXTERN_CVAR(Float, vr_weaponScale)
|
||||
|
||||
extern TDeletingArray<FVoxel *> Voxels;
|
||||
extern TDeletingArray<FVoxelDef *> VoxelDefs;
|
||||
|
@ -227,6 +228,9 @@ void FModelRenderer::RenderHUDModel(DPSprite *psp, float ofsX, float ofsY)
|
|||
objectToWorldMatrix.rotate(smf->pitchoffset, 0, 0, 1);
|
||||
objectToWorldMatrix.rotate(-smf->rolloffset, 1, 0, 0);
|
||||
|
||||
//Scale weapon
|
||||
objectToWorldMatrix.scale(vr_weaponScale, vr_weaponScale, vr_weaponScale);
|
||||
|
||||
float orientation = smf->xscale * smf->yscale * smf->zscale;
|
||||
|
||||
BeginDrawHUDModel(playermo, objectToWorldMatrix, orientation < 0);
|
||||
|
|
|
@ -2349,7 +2349,7 @@ OptionMenu VROptionsMenu protected
|
|||
StaticText "Weapon"
|
||||
Option "Weapon Recoil", "vr_recoil", "OnOff"
|
||||
Slider "Weapon Pitch Adjust", "vr_weaponRotate", -45, 45, 5, 2
|
||||
Slider "Weapon Sprite Scale", "vr_weaponScale", 0.1, 1.0, 0.01, 2
|
||||
Slider "Weapon Sprite/Model Scale", "vr_weaponScale", 0.1, 3.0, 0.1, 2
|
||||
Option "Weapon Sprite 3D", "r_PlayerSprites3DMode", "Sprites3DMode"
|
||||
Slider "Weapon Fat Item Width", "gl_fatItemWidth", 0.1, 1.0, 0.1, 2
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue