Merge branch 'make-linedef-422-smarter' into 'next'

Make Linedef type 422 smarter

See merge request STJr/SRB2!1014
This commit is contained in:
LJ Sonic 2020-07-04 08:35:42 -04:00
commit 77e39a0fd5
1 changed files with 15 additions and 10 deletions

View File

@ -2951,30 +2951,35 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
// If titlemap, set the camera ref for title's thinker // If titlemap, set the camera ref for title's thinker
// This is not revoked until overwritten; awayviewtics is ignored // This is not revoked until overwritten; awayviewtics is ignored
if (titlemapinaction) if (titlemapinaction)
{
titlemapcameraref = altview; titlemapcameraref = altview;
return; else
{
P_SetTarget(&mo->player->awayviewmobj, altview);
mo->player->awayviewtics = P_AproxDistance(line->dx, line->dy)>>FRACBITS;
} }
P_SetTarget(&mo->player->awayviewmobj, altview);
mo->player->awayviewtics = P_AproxDistance(line->dx, line->dy)>>FRACBITS;
if (line->flags & ML_NOCLIMB) // lets you specify a vertical angle if (line->flags & ML_NOCLIMB) // lets you specify a vertical angle
{ {
INT32 aim; INT32 aim;
aim = sides[line->sidenum[0]].textureoffset>>FRACBITS; aim = sides[line->sidenum[0]].textureoffset>>FRACBITS;
while (aim < 0) aim = (aim + 360) % 360;
aim += 360;
while (aim >= 360)
aim -= 360;
aim *= (ANGLE_90>>8); aim *= (ANGLE_90>>8);
aim /= 90; aim /= 90;
aim <<= 8; aim <<= 8;
mo->player->awayviewaiming = (angle_t)aim; if (titlemapinaction)
titlemapcameraref->cusval = (angle_t)aim;
else
mo->player->awayviewaiming = (angle_t)aim;
} }
else else
mo->player->awayviewaiming = 0; // straight ahead {
// straight ahead
if (!titlemapinaction)
mo->player->awayviewaiming = 0;
// don't do cusval cause that's annoying
}
} }
break; break;