mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
fix portal interp view positioning
This commit is contained in:
parent
a37ae53ff7
commit
a3bc32f7a0
1 changed files with 9 additions and 9 deletions
18
src/r_main.c
18
src/r_main.c
|
@ -1175,11 +1175,11 @@ static void R_PortalFrame(line_t *start, line_t *dest, portal_pair *portal)
|
|||
#endif
|
||||
|
||||
//R_SetupFrame(player, false);
|
||||
newview->x = portal->viewx;
|
||||
newview->y = portal->viewy;
|
||||
newview->z = portal->viewz;
|
||||
viewx = portal->viewx;
|
||||
viewy = portal->viewy;
|
||||
viewz = portal->viewz;
|
||||
|
||||
newview->angle = portal->viewangle;
|
||||
viewangle = portal->viewangle;
|
||||
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
||||
// newview->cos = FINECOSINE(newview->angle>>ANGLETOFINESHIFT);
|
||||
|
||||
|
@ -1207,13 +1207,13 @@ static void R_PortalFrame(line_t *start, line_t *dest, portal_pair *portal)
|
|||
if (dangle == 0)
|
||||
#endif
|
||||
{ // the entrance goes straight opposite the exit, so we just need to mess with the offset.
|
||||
newview->x += dest_c.x - start_c.x;
|
||||
newview->y += dest_c.y - start_c.y;
|
||||
viewx += dest_c.x - start_c.x;
|
||||
viewy += dest_c.y - start_c.y;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ANGLED_PORTALS
|
||||
newview->angle += dangle;
|
||||
viewangle += dangle;
|
||||
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
||||
// newview->cos = FINECOSINE(newview->angle>>ANGLETOFINESHIFT);
|
||||
//CONS_Printf("dangle == %u\n", AngleFixed(dangle)>>FRACBITS);
|
||||
|
@ -1227,8 +1227,8 @@ static void R_PortalFrame(line_t *start, line_t *dest, portal_pair *portal)
|
|||
angtopoint = R_PointToAngle2(start_c.x, start_c.y, newview->x, newview->y);
|
||||
angtopoint += dangle;
|
||||
|
||||
newview->x = dest_c.x+FixedMul(FINECOSINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||
newview->y = dest_c.y+FixedMul(FINESINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||
viewx = dest_c.x+FixedMul(FINECOSINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||
viewy = dest_c.y+FixedMul(FINESINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue