Reimplemented analog mode cam_dist increase, slight comment updates

Analog mode's camera is now x1.2 of your actual cam_dist setting,
instead of being strictly 192. "analog on" seems to reset this modifier
every once in a while, but "useranalog on" prevents this. The wiki
itself says that you should only change useranalog though, so it
shouldn't be too big of a deal.
This commit is contained in:
TehRealSalt 2017-03-26 17:11:04 -04:00
parent dbcbcf5da3
commit e5245c508d
3 changed files with 15 additions and 24 deletions

View File

@ -1565,12 +1565,6 @@ static void Analog_OnChange(void)
return;
// cameras are not initialized at this point
// Salt: Grooooaaan... I know that cameras aren't initalized yet and that analog needs a farther camera, but directly overwriting someone's settings should not be the way to do it!
/*if (leveltime > 1)
CV_SetValue(&cv_cam_dist, 128);
if (cv_analog.value || demoplayback)
CV_SetValue(&cv_cam_dist, 192);*/
if (!cv_chasecam.value && cv_analog.value) {
CV_SetValue(&cv_analog, 0);
@ -1591,12 +1585,6 @@ static void Analog2_OnChange(void)
return;
// cameras are not initialized at this point
// Salt: Grooooaaan... I know that cameras aren't initalized yet and that analog needs a farther camera, but directly overwriting someone's settings should not be the way to do it!
/*if (leveltime > 1)
CV_SetValue(&cv_cam2_dist, 128);
if (cv_analog2.value)
CV_SetValue(&cv_cam2_dist, 192);*/
if (!cv_chasecam2.value && cv_analog2.value) {
CV_SetValue(&cv_analog2, 0);

View File

@ -2583,8 +2583,9 @@ boolean P_SetupLevel(boolean skipprecip)
if (!dedicated)
{
//if (!cv_cam_speed.changed)
//CV_Set(&cv_cam_speed, cv_cam_speed.defaultvalue);
// Salt: CV_ClearChangedFlags() messes with your settings :(
/*if (!cv_cam_speed.changed)
CV_Set(&cv_cam_speed, cv_cam_speed.defaultvalue);*/
if (!cv_chasecam.changed)
CV_SetValue(&cv_chasecam, chase);
@ -2881,24 +2882,22 @@ boolean P_SetupLevel(boolean skipprecip)
}
}
// Salt: I don't understand *why* it does this, but this overwrites the player's setting, even though it looks like it shouldn't do that unless if it's already the default
// Salt: CV_ClearChangedFlags() messes with your settings :(
/*if (!cv_cam_height.changed)
CV_Set(&cv_cam_height, cv_cam_height.defaultvalue);
if (!cv_cam_dist.changed)
CV_Set(&cv_cam_dist, cv_cam_dist.defaultvalue);
if (!cv_cam_rotate.changed)
CV_Set(&cv_cam_rotate, cv_cam_rotate.defaultvalue);
if (!cv_cam2_height.changed)
CV_Set(&cv_cam2_height, cv_cam2_height.defaultvalue);
if (!cv_cam_dist.changed)
CV_Set(&cv_cam_dist, cv_cam_dist.defaultvalue);
if (!cv_cam2_dist.changed)
CV_Set(&cv_cam2_dist, cv_cam2_dist.defaultvalue);
CV_Set(&cv_cam2_dist, cv_cam2_dist.defaultvalue);*/
// Though, I don't think anyone would care about cam_rotate being reset back to the only value that makes sense :P
if (!cv_cam_rotate.changed)
CV_Set(&cv_cam_rotate, cv_cam_rotate.defaultvalue);
if (!cv_cam2_rotate.changed)
CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue);*/
CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue);
if (!cv_analog.changed)
CV_SetValue(&cv_analog, 0);

View File

@ -8289,6 +8289,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
{
dist = camdist;
// x1.2 dist for analog
if (P_AnalogMove(player))
dist = FixedMul(dist, 6*FRACUNIT/5);
if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->powers[pw_carry] && player->powers[pw_carry] != CR_PLAYER))
dist <<= 1;
}