mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 15:22:20 +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
|
#endif
|
||||||
|
|
||||||
//R_SetupFrame(player, false);
|
//R_SetupFrame(player, false);
|
||||||
newview->x = portal->viewx;
|
viewx = portal->viewx;
|
||||||
newview->y = portal->viewy;
|
viewy = portal->viewy;
|
||||||
newview->z = portal->viewz;
|
viewz = portal->viewz;
|
||||||
|
|
||||||
newview->angle = portal->viewangle;
|
viewangle = portal->viewangle;
|
||||||
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
||||||
// newview->cos = FINECOSINE(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)
|
if (dangle == 0)
|
||||||
#endif
|
#endif
|
||||||
{ // the entrance goes straight opposite the exit, so we just need to mess with the offset.
|
{ // the entrance goes straight opposite the exit, so we just need to mess with the offset.
|
||||||
newview->x += dest_c.x - start_c.x;
|
viewx += dest_c.x - start_c.x;
|
||||||
newview->y += dest_c.y - start_c.y;
|
viewy += dest_c.y - start_c.y;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANGLED_PORTALS
|
#ifdef ANGLED_PORTALS
|
||||||
newview->angle += dangle;
|
viewangle += dangle;
|
||||||
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
// newview->sin = FINESINE(newview->angle>>ANGLETOFINESHIFT);
|
||||||
// newview->cos = FINECOSINE(newview->angle>>ANGLETOFINESHIFT);
|
// newview->cos = FINECOSINE(newview->angle>>ANGLETOFINESHIFT);
|
||||||
//CONS_Printf("dangle == %u\n", AngleFixed(dangle)>>FRACBITS);
|
//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 = R_PointToAngle2(start_c.x, start_c.y, newview->x, newview->y);
|
||||||
angtopoint += dangle;
|
angtopoint += dangle;
|
||||||
|
|
||||||
newview->x = dest_c.x+FixedMul(FINECOSINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
viewx = dest_c.x+FixedMul(FINECOSINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||||
newview->y = dest_c.y+FixedMul(FINESINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
viewy = dest_c.y+FixedMul(FINESINE(angtopoint>>ANGLETOFINESHIFT), disttopoint);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue