mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix viewing through moving cameras.
It's still not pretty though since there's no interpolation from G_DrawRooms(). git-svn-id: https://svn.eduke32.com/eduke32@3149 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3bcdc5acb8
commit
3d74c8a9fd
3 changed files with 16 additions and 7 deletions
|
@ -4359,6 +4359,19 @@ static void getzsofslope_player(int16_t sectnum, int32_t dax, int32_t day, int32
|
|||
}
|
||||
#endif
|
||||
|
||||
void P_UpdatePosWhenViewingCam(DukePlayer_t *p)
|
||||
{
|
||||
int32_t i = p->newowner;
|
||||
|
||||
p->pos.x = SX;
|
||||
p->pos.y = SY;
|
||||
p->pos.z = SZ;
|
||||
p->ang = SA;
|
||||
p->vel.x = p->vel.y = sprite[p->i].xvel = 0;
|
||||
p->look_ang = 0;
|
||||
p->rotscrnang = 0;
|
||||
}
|
||||
|
||||
void P_ProcessInput(int32_t snum)
|
||||
{
|
||||
DukePlayer_t *const p = g_player[snum].ps;
|
||||
|
@ -4577,6 +4590,7 @@ void P_ProcessInput(int32_t snum)
|
|||
|
||||
if (p->newowner >= 0)
|
||||
{
|
||||
P_UpdatePosWhenViewingCam(p);
|
||||
P_DoCounters(p);
|
||||
|
||||
if (*aplWeaponWorksLike[p->curr_weapon] == HANDREMOTE_WEAPON)
|
||||
|
|
|
@ -308,6 +308,7 @@ void P_DropWeapon(DukePlayer_t *p);
|
|||
int32_t P_FindOtherPlayer(int32_t p,int32_t *d);
|
||||
void P_FireWeapon(DukePlayer_t *p);
|
||||
void P_FragPlayer(int32_t snum);
|
||||
void P_UpdatePosWhenViewingCam(DukePlayer_t *p);
|
||||
void P_ProcessInput(int32_t snum);
|
||||
void P_ProcessWeapon(int32_t snum);
|
||||
void P_QuickKill(DukePlayer_t *p);
|
||||
|
|
|
@ -3278,13 +3278,7 @@ void P_CheckSectors(int32_t snum)
|
|||
// parallaxtype = 2;
|
||||
p->newowner = i;
|
||||
|
||||
p->pos.x = SX;
|
||||
p->pos.y = SY;
|
||||
p->pos.z = SZ;
|
||||
p->ang = SA;
|
||||
p->vel.x = p->vel.y = sprite[p->i].xvel = 0;
|
||||
p->look_ang = 0;
|
||||
p->rotscrnang = 0;
|
||||
P_UpdatePosWhenViewingCam(p);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue