Skip to content

Commit

Permalink
Add customizable stepsize for auto-stair climbing
Browse files Browse the repository at this point in the history
  • Loading branch information
vittorioromeo committed Oct 12, 2023
1 parent fbcf673 commit e00463d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 1 deletion.
Binary file modified QC/pak11.pak
Binary file not shown.
Binary file modified QC/vrprogs.dat
Binary file not shown.
7 changes: 7 additions & 0 deletions Quake/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,13 @@ void M_QuakeVRSettings_Key(int k)
);

m.add_cvar_entry<bool>("Viewkick", vr_viewkick);

// ------------------------------------------------------------------------
m.add_separator();
// ------------------------------------------------------------------------

m.add_cvar_entry<float>(
"Player Stepsize", vr_player_stepsize, {1, 0, 128});

return m;
}
Expand Down
2 changes: 1 addition & 1 deletion Quake/sv_phys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ void SV_WalkMove(edict_t* ent, const bool resetOnGround)
//
ent->v.origin = oldorg; // back to start pos

constexpr float stepsize = 18.f;
const float stepsize = vr_player_stepsize.value;
const qvec3 upmove{0.f, 0.f, stepsize};
const qvec3 downmove{0.f, 0.f, -stepsize + oldvel[2] * host_frametime};

Expand Down
1 change: 1 addition & 0 deletions Quake/vr_cvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ DEFINE_FCVAR_ARCHIVE(vr_disablehaptics, 0);
DEFINE_FCVAR_ARCHIVE(vr_spinreload_pitch_speed, 1100);
DEFINE_FCVAR_ARCHIVE(vr_spinreload_x_angular_threshold, 6.5);
DEFINE_FCVAR_ARCHIVE(vr_throw_algorithm, 0);
DEFINE_FCVAR_ARCHIVE(vr_player_stepsize, 18.0);

//
//
Expand Down
1 change: 1 addition & 0 deletions Quake/vr_cvars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ extern cvar_t vr_spinreload_x_angular_threshold;
extern cvar_t vr_fakevr_handroll;
extern cvar_t vr_throw_algorithm;
extern cvar_t vr_throw_angvel_avg_frames;
extern cvar_t vr_player_stepsize;

//
//
Expand Down
1 change: 1 addition & 0 deletions ReleaseFiles/Id1/config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ vr_msaa "9"
vr_offhandpitch "40.25"
vr_offhandyaw "-4"
vr_player_shadows "2"
vr_player_stepsize "18"
vr_positional_damage "1"
vr_reload_mode "2"
vr_roomscale_jump "1"
Expand Down
Binary file modified ReleaseFiles/Id1/pak11.pak
Binary file not shown.

0 comments on commit e00463d

Please sign in to comment.