mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 23:21:58 +00:00
Use correct subsector for interpolation, ensure view mobj is set
This commit is contained in:
parent
8ad191b080
commit
233bddc68e
2 changed files with 5 additions and 3 deletions
|
@ -191,7 +191,7 @@ void R_InterpolateView(fixed_t frac)
|
||||||
// this is gonna create some interesting visual errors for long distance teleports...
|
// this is gonna create some interesting visual errors for long distance teleports...
|
||||||
// might want to recalculate the view sector every frame instead...
|
// might want to recalculate the view sector every frame instead...
|
||||||
viewplayer = newview->player;
|
viewplayer = newview->player;
|
||||||
viewsector = R_PointInSubsector(viewx, viewy)->sector;
|
viewsector = R_PointInWorldSubsector(viewworld, viewx, viewy)->sector;
|
||||||
|
|
||||||
// well, this ain't pretty
|
// well, this ain't pretty
|
||||||
if (newview == &sky1view_new || newview == &sky2view_new)
|
if (newview == &sky1view_new || newview == &sky2view_new)
|
||||||
|
@ -309,7 +309,7 @@ void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
|
||||||
out->spritexoffset = mobj->spritexoffset;
|
out->spritexoffset = mobj->spritexoffset;
|
||||||
out->spriteyoffset = mobj->spriteyoffset;
|
out->spriteyoffset = mobj->spriteyoffset;
|
||||||
|
|
||||||
out->subsector = R_PointInSubsector(out->x, out->y);
|
out->subsector = R_PointInWorldSubsector(viewworld, out->x, out->y);
|
||||||
|
|
||||||
if (mobj->player)
|
if (mobj->player)
|
||||||
{
|
{
|
||||||
|
@ -347,7 +347,7 @@ void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjst
|
||||||
out->spritexoffset = R_LerpFixed(mobj->old_spritexoffset, mobj->spritexoffset, frac);
|
out->spritexoffset = R_LerpFixed(mobj->old_spritexoffset, mobj->spritexoffset, frac);
|
||||||
out->spriteyoffset = R_LerpFixed(mobj->old_spriteyoffset, mobj->spriteyoffset, frac);
|
out->spriteyoffset = R_LerpFixed(mobj->old_spriteyoffset, mobj->spriteyoffset, frac);
|
||||||
|
|
||||||
out->subsector = R_PointInSubsector(out->x, out->y);
|
out->subsector = R_PointInWorldSubsector(viewworld, out->x, out->y);
|
||||||
|
|
||||||
out->angle = R_LerpAngle(mobj->old_angle, mobj->angle, frac);
|
out->angle = R_LerpAngle(mobj->old_angle, mobj->angle, frac);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1144,6 +1144,8 @@ void R_SetupFrame(player_t *player)
|
||||||
if (viewworld == NULL)
|
if (viewworld == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
R_SetViewMobj(player);
|
||||||
|
|
||||||
camera_t *thiscam = r_viewcam;
|
camera_t *thiscam = r_viewcam;
|
||||||
boolean chasecam = R_ViewpointHasChasecam(player);
|
boolean chasecam = R_ViewpointHasChasecam(player);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue