mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'screen-shake-cvar' into 'master'
Add "screenshake" cvar See merge request KartKrew/Kart!1753
This commit is contained in:
commit
03248d6bf8
4 changed files with 11 additions and 2 deletions
|
|
@ -549,6 +549,7 @@ consvar_t cv_playbackspeed = Server("playbackspeed", "1").min_max(1, 10).dont_sa
|
|||
#endif
|
||||
|
||||
consvar_t cv_reducevfx = Server("reducevfx", "No").yes_no();
|
||||
consvar_t cv_screenshake = Server("screenshake", "Full").values({{0, "Off"}, {1, "Half"}, {2, "Full"}});
|
||||
|
||||
consvar_t cv_rendezvousserver = Server("holepunchserver", "relay.kartkrew.org");
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ extern consvar_t cv_botscanvote;
|
|||
|
||||
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugdistribution, cv_kartdebughuddrop;
|
||||
extern consvar_t cv_kartdebugnodes, cv_kartdebugcolorize, cv_kartdebugdirector;
|
||||
extern consvar_t cv_spbtest, cv_reducevfx;
|
||||
extern consvar_t cv_spbtest, cv_reducevfx, cv_screenshake;
|
||||
extern consvar_t cv_kartdebugwaypoints, cv_kartdebugbots;
|
||||
extern consvar_t cv_kartdebugstart;
|
||||
extern consvar_t cv_debugrank;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ menuitem_t OPTIONS_ProfileAccessibility[] = {
|
|||
|
||||
{IT_STRING | IT_CVAR, "Reduce Effects", "If overwhelmed, hide less-important particle cues.",
|
||||
NULL, {.cvar = &cv_reducevfx}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Screenshake Strength", "Adjust shake intensity from hazards and offroad.",
|
||||
NULL, {.cvar = &cv_screenshake}, 0, 0},
|
||||
};
|
||||
|
||||
menu_t OPTIONS_ProfileAccessibilityDef = {
|
||||
|
|
|
|||
|
|
@ -9454,7 +9454,7 @@ void P_DoQuakeOffset(UINT8 view, mappoint_t *viewPos, mappoint_t *offset)
|
|||
fixed_t ir = 0;
|
||||
fixed_t addZ = 0;
|
||||
|
||||
if (cv_reducevfx.value == 1)
|
||||
if (cv_screenshake.value == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -9517,6 +9517,11 @@ void P_DoQuakeOffset(UINT8 view, mappoint_t *viewPos, mappoint_t *offset)
|
|||
addZ = -addZ;
|
||||
}
|
||||
|
||||
if (cv_screenshake.value == 1) // Half
|
||||
{
|
||||
addZ /= 2;
|
||||
}
|
||||
|
||||
// Finalize the effects.
|
||||
offset->z += addZ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue