- optimized the portal translation functions by precalculating the rotation angle, sine and cosine.

This commit is contained in:
Christoph Oelckers 2016-03-03 11:58:04 +01:00
commit 14a0567343
5 changed files with 65 additions and 68 deletions

View file

@ -732,9 +732,9 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
}
else
{
P_TranslatePortalXY(pds->src, pds->dst, viewx, viewy);
P_TranslatePortalZ(pds->src, pds->dst, viewz);
P_TranslatePortalAngle(pds->src, pds->dst, viewangle);
P_TranslatePortalXY(pds->src, viewx, viewy);
P_TranslatePortalZ(pds->src, viewz);
P_TranslatePortalAngle(pds->src, viewangle);
}
viewsin = finesine[viewangle>>ANGLETOFINESHIFT];