always account for mobjscale in precip
this is a fix not some feature honestly
This commit is contained in:
1 parent
c167ece1ca
commit
3c3887420e
8 files changed
+20
-31
No files matched your search
@@ -4643,7 +4643,7 @@ static void HWR_AddPrecipitationSprites(void)
|
||||
return;
|
||||
}
|
||||
|
||||
drawdist = ((fixed_t)(cv_drawdist_precip.value) * (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT));
|
||||
drawdist = ((fixed_t)(cv_drawdist_precip.value) * mapobjectscale);
|
||||
|
||||
// No to infinite precipitation draw distance.
|
||||
if (cv_drawdist_precip.value == 0)
|
||||
|
||||
+11
-14
@@ -935,28 +935,27 @@ static menuitem_t OP_ExpOptionsMenu[] =
|
||||
{IT_STRING|IT_CVAR, NULL, "Interpolation Distance", &cv_maxinterpdist, 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Weather Interpolation", &cv_precipinterp, 15},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Scale Weather with Mobjscale", &cv_mobjscaleprecip, 25},
|
||||
{IT_STRING | IT_CVAR, NULL, "Less Weather Effects", &cv_lessprecip, 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Less Weather Effects", &cv_lessprecip, 25},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Minimum Sector Brightness", &cv_secbright, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Minimum Sector Brightness", &cv_secbright, 35},
|
||||
|
||||
//{IT_STRING | IT_CVAR, NULL, "Randomized Directional Light", &cv_randomdirlight, 55}, // should this ever come back
|
||||
//{IT_STRING | IT_CVAR, NULL, "Randomized Directional Light", &cv_randomdirlight, 50}, // should this ever come back
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 45},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "FPS counter sampling", &cv_accuratefps, 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "FPS counter sampling", &cv_accuratefps, 55},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Votescreen Scaling", &cv_votebgscaling, 70},
|
||||
{IT_STRING | IT_CVAR, NULL, "Votescreen Scaling", &cv_votebgscaling, 65},
|
||||
|
||||
#ifdef HWRENDER
|
||||
{IT_STRING | IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 80},
|
||||
{IT_STRING | IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 75},
|
||||
#ifdef USE_FBO_OGL
|
||||
{IT_STRING | IT_CVAR, NULL, "FBO Downsampling support", &cv_glframebuffer, 85},
|
||||
{IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 95},
|
||||
{IT_DISABLED, NULL, "", NULL, 105}, // dummy text
|
||||
#else
|
||||
{IT_STRING | IT_CVAR, NULL, "FBO Downsampling support", &cv_glframebuffer, 80},
|
||||
{IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 90},
|
||||
{IT_DISABLED, NULL, "", NULL, 100}, // dummy text
|
||||
#else
|
||||
{IT_STRING | IT_CVAR, NULL, "Palette Depth", &cv_glpalettedepth, 85},
|
||||
{IT_DISABLED, NULL, "", NULL, 95}, // dummy text
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
@@ -966,7 +965,6 @@ static const char* OP_ExpTooltips[] =
|
||||
NULL,
|
||||
"How far Mobj interpolation should take effect.",
|
||||
"Should weather be interpolated? Weather should look about the\nsame but perform a bit better when disabled.",
|
||||
"Should weather be scaled with Mapobjectscale?.",
|
||||
"When weather is on this will cut the object amount used in half.",
|
||||
"Sets minimum sector brightness, useful for dark areas",
|
||||
//"Should the directional lightning be randomized each map?\nTakes effect on next map load.",
|
||||
@@ -987,7 +985,6 @@ enum
|
||||
op_exp_header,
|
||||
op_exp_interpdist,
|
||||
op_exp_precipinter,
|
||||
op_exp_precipmoscale,
|
||||
op_exp_lessprecip,
|
||||
op_exp_secbright,
|
||||
//op_exp_dirlight,
|
||||
|
||||
+3
-4
@@ -3662,7 +3662,7 @@ boolean P_PrecipThinker(precipmobj_t *mobj)
|
||||
return false;
|
||||
|
||||
mobj->z = mobj->ceilingz;
|
||||
mobj->momz = cv_mobjscaleprecip.value ? FixedMul(mobj->info->speed, mapobjectscale) : mobj->info->speed;
|
||||
mobj->momz = FixedMul(mobj->info->speed, mapobjectscale);
|
||||
mobj->precipflags &= ~PCF_SPLASH;
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
}
|
||||
@@ -10122,7 +10122,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
|
||||
mobj->ceilingz = P_GetSectorCeilingZAt(mobj->subsector->sector, x, y);
|
||||
|
||||
mobj->z = z;
|
||||
mobj->momz = cv_mobjscaleprecip.value ? FixedMul(info->speed, mapobjectscale) : info->speed;
|
||||
mobj->momz = FixedMul(info->speed, mapobjectscale);
|
||||
|
||||
mobj->thinker.function = (actionf_p1)P_NullPrecipThinker;
|
||||
P_AddPrecipThinker(&mobj->thinker);
|
||||
@@ -10325,7 +10325,6 @@ void P_SpawnPrecipitation(void)
|
||||
if (dedicated || !cv_drawdist_precip.value || curWeather == PRECIP_NONE || curWeather == PRECIP_STORM_NORAIN)
|
||||
return;
|
||||
|
||||
const fixed_t precipmoscale = (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT);
|
||||
const INT32 density = (cv_lessprecip.value ? 2 : 1); // only spawn half as much
|
||||
|
||||
// Use the blockmap to narrow down our placing patterns
|
||||
@@ -10336,7 +10335,7 @@ void P_SpawnPrecipitation(void)
|
||||
|
||||
// If mobjscale < FRACUNIT, each blockmap cell covers
|
||||
// more area so spawn more precipitation in that area.
|
||||
for (j = 0; j < FRACUNIT; j += precipmoscale)
|
||||
for (j = 0; j < FRACUNIT; j += mapobjectscale)
|
||||
{
|
||||
INT32 floorz;
|
||||
INT32 ceilingz;
|
||||
|
||||
+1
-1
@@ -1799,7 +1799,7 @@ void P_SwitchWeather(INT32 weathernum)
|
||||
precipmobj->tics = st->tics;
|
||||
precipmobj->sprite = st->sprite;
|
||||
precipmobj->frame = st->frame;
|
||||
precipmobj->momz = (cv_mobjscaleprecip.value ? FixedMul(mobjinfo[type].speed, mapobjectscale) : mobjinfo[type].speed);
|
||||
precipmobj->momz = FixedMul(mobjinfo[type].speed, mapobjectscale);
|
||||
|
||||
precipmobj->precipflags &= ~(PCF_INVISIBLE|PCF_SPLASH); // P_PrecipThinker will add this again if it needs to
|
||||
}
|
||||
|
||||
+2
-6
@@ -387,18 +387,14 @@ void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjst
|
||||
out->x = mobj->x;
|
||||
out->y = mobj->y;
|
||||
out->z = mobj->z;
|
||||
out->scale = cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT;
|
||||
//out->subsector = mobj->subsector;
|
||||
//out->angle = mobj->angle;
|
||||
out->scale = mapobjectscale;
|
||||
return;
|
||||
}
|
||||
|
||||
out->x = R_LerpFixed(mobj->old_x, mobj->x, frac);
|
||||
out->y = R_LerpFixed(mobj->old_y, mobj->y, frac);
|
||||
out->z = R_LerpFixed(mobj->old_z, mobj->z, frac);
|
||||
out->scale = cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT;
|
||||
//out->subsector = R_PointInSubsector(out->x, out->y); // this is unused
|
||||
//out->angle = R_LerpAngle(mobj->old_angle, mobj->angle, frac);
|
||||
out->scale = mapobjectscale;
|
||||
}
|
||||
|
||||
static levelinterpolator_t *CreateInterpolator(levelinterpolator_type_e type, thinker_t *thinker)
|
||||
|
||||
@@ -192,7 +192,6 @@ consvar_t cv_translucency = {"translucency", "On", CV_SAVE, CV_OnOff, NULL, 0
|
||||
consvar_t cv_drawdist = {"drawdist", "Infinite", CV_SAVE, drawdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_drawdist_precip = {"drawdist_precip", "1024", CV_SAVE|CV_CALL|CV_NOINIT, drawdist_precip_cons_t, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lessprecip = {"lessweathereffects", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mobjscaleprecip = {"scaleprecipmobjscale", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_maxinterpdist = {"maxinterpdist", "Infinite", CV_SAVE, maxinterpdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_playerfade = {"playerfade", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_ripplewater = {"waterripples", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -1539,7 +1538,6 @@ void R_RegisterEngineStuff(void)
|
||||
CV_RegisterVar(&cv_drawdist);
|
||||
CV_RegisterVar(&cv_drawdist_precip);
|
||||
CV_RegisterVar(&cv_lessprecip);
|
||||
CV_RegisterVar(&cv_mobjscaleprecip);
|
||||
|
||||
CV_RegisterVar(&cv_fovchange);
|
||||
CV_RegisterVar(&cv_fov);
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ extern consvar_t cv_shadow, cv_shadowoffs;
|
||||
extern consvar_t cv_ffloorclip, cv_spriteclip;
|
||||
extern consvar_t cv_softcyancut;
|
||||
extern consvar_t cv_translucency;
|
||||
extern consvar_t cv_drawdist, cv_drawdist_precip, cv_lessprecip, cv_mobjscaleprecip;
|
||||
extern consvar_t cv_drawdist, cv_drawdist_precip, cv_lessprecip;
|
||||
extern consvar_t cv_fov, cv_fovchange;
|
||||
extern consvar_t cv_skybox;
|
||||
extern consvar_t cv_tailspickup;
|
||||
|
||||
+1
-2
@@ -2094,8 +2094,7 @@ void R_AddPrecipitationSprites(void)
|
||||
return;
|
||||
}
|
||||
|
||||
const fixed_t precipscale = (cv_mobjscaleprecip.value ? mapobjectscale : FRACUNIT);
|
||||
const fixed_t drawdist = ((fixed_t)(cv_drawdist_precip.value) * precipscale);
|
||||
const fixed_t drawdist = ((fixed_t)(cv_drawdist_precip.value) * mapobjectscale);
|
||||
|
||||
// no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off
|
||||
if (drawdist == 0)
|
||||
|
||||
Reference in new issue
Block a user