sloperoll already has "off" setting, delet spriteroll cvar since redundant

This commit is contained in:
Alug committed 2024-11-30 21:54:48 +01:00
1 parent 975978ca9c
commit 43f8a0213a
7 files changed
+23 -32

No files matched your search

-1
View File
@@ -524,7 +524,6 @@ static CV_PossibleValue_t sloperolldist_cons_t[] = {
{8192, "8192"}, {0, "Infinite"}, {0, NULL}};
consvar_t cv_sloperolldist = {"sloperolldist", "Infinite", CV_SAVE, sloperolldist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t sloperoll_cons_t[] = {{0, "Off"}, {1, "Players"}, {2, "Everything"}, {0, NULL}};
consvar_t cv_spriteroll = {"spriteroll", "Off", CV_SAVE|CV_CALL, CV_OnOff, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_sloperoll = {"sloperoll", "Off", CV_SAVE|CV_CALL, sloperoll_cons_t, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_sparkroll = {"sparkroll", "Off", CV_SAVE|CV_CALL, CV_OnOff, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_sliptideroll = {"sliptideroll", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
-1
View File
@@ -166,7 +166,6 @@ extern consvar_t cv_saltysquish;
extern consvar_t cv_driftsparkpulse;
extern consvar_t cv_gravstretch;
extern consvar_t cv_sloperoll;
extern consvar_t cv_spriteroll;
extern consvar_t cv_sliptideroll;
extern consvar_t cv_slamsound;
extern consvar_t cv_sloperolldist;
+2 -2
View File
@@ -4509,8 +4509,8 @@ static void HWR_ProjectSprite(mobj_t *thing)
#ifdef ROTSPRITE
// determine here if sprite should rotate for optimization
const boolean sliprollrotate = (cv_spriteroll.value && cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (cv_spriteroll.value && (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate));
const boolean sliprollrotate = (cv_sloperoll.value && cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (cv_sloperoll.value && (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate));
#endif
//Fab : 02-08-98: 'skin' override spritedef currently used for skin
+11 -19
View File
@@ -2224,22 +2224,20 @@ static menuitem_t OP_PlayerDistortMenu[] =
{
{IT_HEADER, NULL, "Sprite Distortion", NULL, 0},
{IT_STRING | IT_CVAR, NULL, "Sprite Rotation", &cv_spriteroll, 15},
{IT_STRING | IT_CVAR, NULL, "Sprite Slope Rotation", &cv_sloperoll, 30},
{IT_STRING | IT_CVAR, NULL, "Slope Rotation Distance", &cv_sloperolldist, 45},
{IT_STRING | IT_CVAR, NULL, "Rotate Players when Sliptiding", &cv_sliptideroll, 60},
{IT_STRING | IT_CVAR, NULL, "Rotate Sparks and Boost Trails", &cv_sparkroll, 75},
{IT_STRING | IT_CVAR, NULL, "Player Stretch Factor", &cv_gravstretch, 90},
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 105},
{IT_STRING | IT_CVAR, NULL, "Saltyhop", &cv_saltyhop, 120},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Sound Effect", &cv_saltyhopsfx, 135},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Squish", &cv_saltysquish, 150},
{IT_STRING | IT_CVAR, NULL, "Sprite Slope Rotation", &cv_sloperoll, 15},
{IT_STRING | IT_CVAR, NULL, "Slope Rotation Distance", &cv_sloperolldist, 30},
{IT_STRING | IT_CVAR, NULL, "Rotate Players when Sliptiding", &cv_sliptideroll, 45},
{IT_STRING | IT_CVAR, NULL, "Rotate Sparks and Boost Trails", &cv_sparkroll, 60},
{IT_STRING | IT_CVAR, NULL, "Player Stretch Factor", &cv_gravstretch, 75},
{IT_STRING | IT_CVAR, NULL, "Squish Sound Effect", &cv_slamsound, 90},
{IT_STRING | IT_CVAR, NULL, "Saltyhop", &cv_saltyhop, 105},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Sound Effect", &cv_saltyhopsfx, 120},
{IT_STRING | IT_CVAR, NULL, "Saltyhop Squish", &cv_saltysquish, 135},
};
static const char* OP_PlayerDistortTooltips[] =
{
NULL,
"Sprite rotation features.",
"Sprite rotation on slopes. Can either be just players or all objects.",
"Distance object rotation should be visable.",
"Player rotation when sliptiding.",
@@ -2254,7 +2252,6 @@ static const char* OP_PlayerDistortTooltips[] =
enum
{
spriteheader,
spriterotate,
sloperotate,
slrotatedist,
sliptide,
@@ -3397,7 +3394,7 @@ void Addons_option_Onchange(void)
void PDistort_menu_Onchange(void)
{
if (!cv_spriteroll.value)
if (!cv_sloperoll.value)
{
OP_PlayerDistortMenu[sloperotate].status = IT_GRAYEDOUT;
OP_PlayerDistortMenu[sliptide].status = IT_GRAYEDOUT;
@@ -3408,15 +3405,10 @@ void PDistort_menu_Onchange(void)
OP_PlayerDistortMenu[sliptide].status = IT_STRING | IT_CVAR;
}
if ((cv_sloperoll.value) && (cv_spriteroll.value)) //enable/disable sloperotate distance
if (cv_sloperoll.value) //enable/disable sloperotate distance
OP_PlayerDistortMenu[slrotatedist].status = IT_STRING | IT_CVAR;
else
OP_PlayerDistortMenu[slrotatedist].status = IT_GRAYEDOUT;
if ((cv_sloperoll.value == 2) && (cv_spriteroll.value)) //enable/disable sparkroll depending on which setting
OP_PlayerDistortMenu[sparkrotate].status = IT_STRING | IT_CVAR;
else
OP_PlayerDistortMenu[sparkrotate].status = IT_GRAYEDOUT;
}
void Bird_menu_Onchange(void)
+8 -6
View File
@@ -6014,15 +6014,17 @@ void P_RollPitchMobj(mobj_t* mobj)
if (!mobj || P_MobjWasRemoved(mobj))
return;
if (cv_spriteroll.value && cv_sloperoll.value == 2)
{
K_RollMobjBySlopes(mobj, cv_sloperolldist.value && !splitscreen);
}
else
I_Assert(mo->subsector != NULL);
I_Assert(mo->subsector->sector != NULL);
if (cv_sloperoll.value != 2)
{
mobj->sloperoll = FixedAngle(0);
mobj->slopepitch = FixedAngle(0);
return;
}
K_RollMobjBySlopes(mobj, cv_sloperolldist.value && !splitscreen);
}
angle_t P_MobjPitchAndRoll(mobj_t *mobj)
@@ -6033,7 +6035,7 @@ angle_t P_MobjPitchAndRoll(mobj_t *mobj)
angle_t camang = 0;
angle_t return_angle = 0;
if (!cv_spriteroll.value)
if (!cv_sloperoll.value)
return 0;
if (P_MobjWasRemoved(mobj))
-1
View File
@@ -1749,7 +1749,6 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_driftsparkpulse);
CV_RegisterVar(&cv_gravstretch);
CV_RegisterVar(&cv_sloperoll);
CV_RegisterVar(&cv_spriteroll);
CV_RegisterVar(&cv_sliptideroll);
CV_RegisterVar(&cv_sloperolldist);
CV_RegisterVar(&cv_sparkroll);
+2 -2
View File
@@ -1224,8 +1224,8 @@ static void R_ProjectSprite(mobj_t *thing)
#ifdef ROTSPRITE
// determine here if sprite should rotate for optimization
const boolean sliprollrotate = (cv_spriteroll.value && cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (cv_spriteroll.value && (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate));
const boolean sliprollrotate = (cv_sloperoll.value && cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (cv_sloperoll.value && (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate));
#endif
//Fab : 02-08-98: 'skin' override spritedef currently used for skin