mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-26 21:01:19 +00:00
Misc camera fixes
- Fixed remaining instances where camera position would scale with the player instead of the level; the camera should almost 100% certainly not change now when you get Grown/Shrunk - Reset camera when switching viewpoint, to make it not look *as* weird when switching after you've finished (needs tested)
This commit is contained in:
parent
2a20939617
commit
6e328a4e73
2 changed files with 5 additions and 4 deletions
|
@ -1857,6 +1857,7 @@ boolean G_Responder(event_t *ev)
|
|||
|
||||
// tell who's the view
|
||||
CONS_Printf(M_GetText("Viewpoint: %s\n"), player_names[displayplayer]);
|
||||
P_ResetCamera(&players[displayplayer], &camera);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8233,8 +8233,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
mo = player->mo;
|
||||
|
||||
thiscam->radius = FixedMul(20*FRACUNIT, mo->scale);
|
||||
thiscam->height = FixedMul(16*FRACUNIT, mo->scale);
|
||||
thiscam->radius = FixedMul(20*FRACUNIT, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
thiscam->height = FixedMul(16*FRACUNIT, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
|
||||
if (!mo)
|
||||
return true;
|
||||
|
@ -8408,7 +8408,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
|
||||
pviewheight = FixedMul(32<<FRACBITS, mo->scale);
|
||||
pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4);
|
||||
|
||||
xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan);
|
||||
|
@ -8417,9 +8416,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
x += xpan;
|
||||
y += ypan;
|
||||
|
||||
pviewheight = FixedMul(32<<FRACBITS, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
z = mo->z + mobjinfo[mo->type].height - pviewheight - camheight;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
|
||||
|
|
Loading…
Reference in a new issue