mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-12 21:22:22 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts: # src/r_main.cpp
This commit is contained in:
commit
0fbfcbbfe9
3 changed files with 13 additions and 3 deletions
|
@ -618,7 +618,7 @@ void P_TranslatePortalVXVY(line_t* src, double &velx, double &vely)
|
|||
double orig_velx = velx;
|
||||
double orig_vely = vely;
|
||||
velx = orig_velx * port->mCosRot - orig_vely * port->mSinRot;
|
||||
vely = orig_vely * port->mCosRot - orig_velx * port->mSinRot;
|
||||
vely = orig_vely * port->mCosRot + orig_velx * port->mSinRot;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -434,14 +434,14 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie
|
|||
}
|
||||
InterpolationPath.Pop();
|
||||
ViewPath[0] = iview->Old.Pos;
|
||||
ViewPath[1] = ViewPath[0] + (InterpolationPath[0].pos - ViewPath[0]).XY().MakeResize(pathlen);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DVector2 disp = Displacements.getOffset(oldgroup, newgroup);
|
||||
ViewPos = iview->Old.Pos + (iview->New.Pos - iview->Old.Pos - disp) * Frac;
|
||||
ViewPath[1] = iview->New.Pos;
|
||||
ViewPath[0] = iview->Old.Pos;
|
||||
ViewPath[0] = ViewPath[1] = iview->New.Pos;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -260,6 +260,16 @@ struct TVector2
|
|||
return len;
|
||||
}
|
||||
|
||||
// Resizes this vector to be the specified length (if it is not 0)
|
||||
TVector2 &MakeResize(double len)
|
||||
{
|
||||
double scale = len / Length();
|
||||
X = vec_t(X * scale);
|
||||
Y = vec_t(Y * scale);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// Dot product
|
||||
double operator | (const TVector2 &other) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue