mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-01 21:00:57 +00:00
- Simplify some vector math in calcChaseCamPos()
.
This commit is contained in:
parent
0d0f5af3fe
commit
7c93d5127b
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ bool calcChaseCamPos(DVector3& ppos, DCoreActor* act, sectortype** psect, const
|
||||||
{
|
{
|
||||||
// Push you a little bit off the wall
|
// Push you a little bit off the wall
|
||||||
*psect = hitinfo.hitSector;
|
*psect = hitinfo.hitSector;
|
||||||
hpos.*c -= npos.*c * npos.XY().dot(hitinfo.hitWall->delta().Angle().ToVector().Rotated90CW()) * (1. / 1024.);
|
hpos.*c += npos.*c * npos.XY().dot(hitinfo.hitWall->normalAngle().ToVector()) * (1. / 1024.);
|
||||||
}
|
}
|
||||||
else if (hitinfo.hitActor == nullptr)
|
else if (hitinfo.hitActor == nullptr)
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ bool calcChaseCamPos(DVector3& ppos, DCoreActor* act, sectortype** psect, const
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// same as wall calculation.
|
// same as wall calculation.
|
||||||
hpos.*c -= npos.*c * npos.XY().dot((act->spr.Angles.Yaw - DAngle90).ToVector().Rotated90CW()) * (1. / 1024.);
|
hpos.*c += npos.*c * npos.XY().dot(act->spr.Angles.Yaw.ToVector()) * (1. / 1024.);
|
||||||
}
|
}
|
||||||
|
|
||||||
const double newdist = hpos.*c / npos.*c;
|
const double newdist = hpos.*c / npos.*c;
|
||||||
|
|
Loading…
Reference in a new issue