improve teleport interpolation stuff
This commit is contained in:
1 parent
b74dd85ef2
commit
1b837a81ef
4 files changed
+26
-16
No files matched your search
+10
-1
@@ -2108,7 +2108,7 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
|
||||
olddisplayplayer = (*displayplayerp);
|
||||
|
||||
/* Check if anyone is available to view. */
|
||||
if (( playernum = G_FindView(playernum, viewnum, onlyactive, playernum < olddisplayplayer) ) == -1)
|
||||
if ((playernum = G_FindView(playernum, viewnum, onlyactive, playernum < olddisplayplayer)) == -1)
|
||||
return;
|
||||
|
||||
/* Focus our target view first so that we don't take its player. */
|
||||
@@ -2117,6 +2117,10 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
|
||||
{
|
||||
camerap = &camera[viewnum-1];
|
||||
P_ResetCamera(&players[(*displayplayerp)], camerap);
|
||||
|
||||
// Make sure the viewport doesn't interpolate at all into
|
||||
// its new position -- just snap instantly into place.
|
||||
R_ResetViewInterpolation(viewnum);
|
||||
}
|
||||
|
||||
if (viewnum > splits)
|
||||
@@ -2129,6 +2133,11 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
|
||||
(*displayplayerp) = G_FindView(0, viewd, onlyactive, false);
|
||||
|
||||
P_ResetCamera(&players[(*displayplayerp)], camerap);
|
||||
|
||||
|
||||
// Make sure the viewport doesn't interpolate at all into
|
||||
// its new position -- just snap instantly into place.
|
||||
R_ResetViewInterpolation(viewd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-5
@@ -2371,11 +2371,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||
y = sides[line->sidenum[0]].rowoffset;
|
||||
z = line->frontsector->ceilingheight;
|
||||
|
||||
P_UnsetThingPosition(mo);
|
||||
mo->x += x;
|
||||
mo->y += y;
|
||||
mo->z += z;
|
||||
P_SetThingPosition(mo);
|
||||
P_SetOrigin(mo, mo->x + x, mo->y + y, mo->z + z);
|
||||
|
||||
if (mo->player)
|
||||
{
|
||||
|
||||
+14
-9
@@ -82,8 +82,13 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
||||
// move chasecam at new player location
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (thing->player == &players[displayplayers[i]] && camera[i].chase)
|
||||
if (thing->player != &players[displayplayers[i]])
|
||||
continue;
|
||||
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(thing->player, &camera[i]);
|
||||
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
}
|
||||
|
||||
// don't run in place after a teleport
|
||||
@@ -153,14 +158,14 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
||||
// move chasecam at new player location
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
if (thing->player == &players[displayplayers[i]])
|
||||
{
|
||||
localangle[i] = angle;
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(thing->player, &camera[i]);
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
break;
|
||||
}
|
||||
if (thing->player != &players[displayplayers[i]])
|
||||
continue;
|
||||
|
||||
localangle[i] = angle;
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(thing->player, &camera[i]);
|
||||
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
}
|
||||
|
||||
// don't run in place after a teleport
|
||||
|
||||
+1
-1
@@ -1989,7 +1989,7 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32
|
||||
|
||||
strncpy(newmusic, mmusic, 6);
|
||||
|
||||
if(LUAh_MusicChange(music_name, newmusic, &mflags, &looping, &position, &prefadems, &fadeinms))
|
||||
if (LUAh_MusicChange(music_name, newmusic, &mflags, &looping, &position, &prefadems, &fadeinms))
|
||||
return;
|
||||
|
||||
// No Music (empty string)
|
||||
|
||||
Reference in new issue
Block a user