remove erronous cv_sloperoll checks

this cvar is meant to be only the toggle for the player slope rotation, however, spriterotation should still be usable in any case with this disabled. the global toggle "cv_spriteroll" has been removed
This commit is contained in:
Alug committed 2025-03-10 13:01:25 +01:00
1 parent ac9926eb17
commit ffe9a89552
6 files changed
+14 -31

No files matched your search

+2 -2
View File
@@ -4578,8 +4578,8 @@ static void HWR_ProjectSprite(mobj_t *thing)
#ifdef ROTSPRITE
// determine here if sprite should rotate for optimization
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));
const boolean sliprollrotate = (cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate);
#endif
//Fab : 02-08-98: 'skin' override spritedef currently used for skin
+1 -1
View File
@@ -1381,7 +1381,7 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
p.angley = FIXED_TO_FLOAT(anglef);
}
const angle_t sliptideroll = ((cv_sloperoll.value && cv_sliptideroll.value && spr->mobj->player) ? spr->mobj->player->sliproll : 0);
const angle_t sliptideroll = ((cv_sliptideroll.value && spr->mobj->player) ? spr->mobj->player->sliproll : 0);
const SINT8 flipfactor = flip ? -1 : 1;
if (spr->mobj->rollangle || sliptideroll)
+6 -12
View File
@@ -401,17 +401,10 @@ static int libd_cachePatch(lua_State *L)
static int libd_cachePatchRotated(lua_State *L)
{
HUDONLY
if (cv_sloperoll.value)
{
angle_t rollangle = luaL_checkangle(L, 2);
INT32 rot = R_GetRollAngle(rollangle);
angle_t rollangle = luaL_checkangle(L, 2);
INT32 rot = R_GetRollAngle(rollangle);
LUA_PushUserdata(L, W_CachePatchNameRotated(luaL_checkstring(L, 1), rot, PU_STATIC), META_PATCH);
LUA_PushUserdata(L, W_CachePatchNameRotated(luaL_checkstring(L, 1), rot, PU_STATIC), META_PATCH);
}
else
{
LUA_PushUserdata(L, W_CachePatchName(luaL_checkstring(L, 1), PU_STATIC), META_PATCH);
}
return 1;
}
#endif
@@ -508,12 +501,13 @@ static int libd_getSpritePatch(lua_State *L)
angle = (angle & 7); // modulus angle by 8
// rotsprite?????
if (lua_isnumber(L, 4) && cv_sloperoll.value)
if (lua_isnumber(L, 4))
{
angle_t rollangle = luaL_checkangle(L, 4);
INT32 rot = R_GetRollAngle(rollangle);
if (rot) {
if (rot)
{
patch_t *rotsprite = Patch_GetRotatedSprite(sprframe, frame, angle, sprframe->flip & (1<<angle), false, sprinfo, rot);
LUA_PushUserdata(L, rotsprite, META_PATCH);
lua_pushboolean(L, false);
+2 -13
View File
@@ -3459,19 +3459,8 @@ void Moviemode_option_Onchange(void)
void PDistort_menu_Onchange(void)
{
if (!cv_sloperoll.value)
{
OP_PlayerDistortMenu[sliptide].status = IT_GRAYEDOUT;
}
else
{
OP_PlayerDistortMenu[sliptide].status = IT_STRING | IT_CVAR;
}
if (cv_sloperoll.value) //enable/disable sloperotate distance
OP_PlayerDistortMenu[slrotatedist].status = IT_STRING | IT_CVAR;
else
OP_PlayerDistortMenu[slrotatedist].status = IT_GRAYEDOUT;
OP_PlayerDistortMenu[slrotatedist].status =
(cv_sloperoll.value) ? IT_STRING | IT_CVAR : IT_GRAYEDOUT;
}
void Bird_menu_Onchange(void)
+1 -1
View File
@@ -372,7 +372,7 @@ angle_t R_PlayerSliptideAngle(player_t *player)
spriteframe_t *sprframe;
angle_t ang = 0;
if (!cv_sloperoll.value || !cv_sliptideroll.value || !player || P_MobjWasRemoved(player->mo))
if (!cv_sliptideroll.value || !player || P_MobjWasRemoved(player->mo))
return 0;
mo = player->mo;
+2 -2
View File
@@ -1233,8 +1233,8 @@ static void R_ProjectSprite(mobj_t *thing)
#ifdef ROTSPRITE
// determine here if sprite should rotate for optimization
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));
const boolean sliprollrotate = (cv_sliptideroll.value && (thing->player && thing->player->sliproll));
const boolean shouldrotate = (interp.roll || interp.pitch || interp.sloperoll || interp.slopepitch || thing->rollangle || sliprollrotate);
#endif
//Fab : 02-08-98: 'skin' override spritedef currently used for skin