mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Ensure view is not interpolated on first frame
This commit is contained in:
parent
c0865e4faa
commit
48d8c83540
2 changed files with 8 additions and 11 deletions
|
@ -4484,13 +4484,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
|
||||
P_MapEnd(); // tmthing is no longer needed from this point onwards
|
||||
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
R_ResetViewInterpolation();
|
||||
R_UpdateMobjInterpolators();
|
||||
R_UpdateMobjInterpolators();
|
||||
}
|
||||
|
||||
// Took me 3 hours to figure out why my progression kept on getting overwritten with the titlemap...
|
||||
if (!titlemapinaction)
|
||||
{
|
||||
|
@ -4519,6 +4512,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
P_MapEnd(); // just in case MapLoad modifies tmthing
|
||||
}
|
||||
|
||||
R_ResetViewInterpolation();
|
||||
R_ResetViewInterpolation();
|
||||
R_UpdateMobjInterpolators();
|
||||
|
||||
// No render mode or reloading gamestate, stop here.
|
||||
if (rendermode == render_none || reloadinggamestate)
|
||||
return true;
|
||||
|
|
|
@ -83,7 +83,7 @@ static viewvars_t sky2view_old;
|
|||
static viewvars_t sky2view_new;
|
||||
|
||||
static viewvars_t *oldview = &p1view_old;
|
||||
static boolean oldview_valid = false;
|
||||
static int oldview_invalid = 0;
|
||||
viewvars_t *newview = &p1view_new;
|
||||
|
||||
|
||||
|
@ -165,7 +165,7 @@ void R_InterpolateView(fixed_t frac)
|
|||
if (frac > FRACUNIT)
|
||||
frac = FRACUNIT;
|
||||
|
||||
if (oldview_valid == false)
|
||||
if (oldview_invalid != 0)
|
||||
{
|
||||
// interpolate from newview to newview
|
||||
prevview = newview;
|
||||
|
@ -201,12 +201,12 @@ void R_UpdateViewInterpolation(void)
|
|||
p2view_old = p2view_new;
|
||||
sky1view_old = sky1view_new;
|
||||
sky2view_old = sky2view_new;
|
||||
oldview_valid = true;
|
||||
if (oldview_invalid) oldview_invalid--;
|
||||
}
|
||||
|
||||
void R_ResetViewInterpolation(void)
|
||||
{
|
||||
oldview_valid = false;
|
||||
oldview_invalid++;
|
||||
}
|
||||
|
||||
void R_SetViewContext(enum viewcontext_e _viewcontext)
|
||||
|
|
Loading…
Reference in a new issue