Merge branch 'make-linedef-422-smarter' into 'next'
Make Linedef type 422 smarter See merge request STJr/SRB2!1014
This commit is contained in:
commit
77e39a0fd5
23
src/p_spec.c
23
src/p_spec.c
|
@ -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);
|
P_SetTarget(&mo->player->awayviewmobj, altview);
|
||||||
mo->player->awayviewtics = P_AproxDistance(line->dx, line->dy)>>FRACBITS;
|
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;
|
||||||
|
if (titlemapinaction)
|
||||||
|
titlemapcameraref->cusval = (angle_t)aim;
|
||||||
|
else
|
||||||
mo->player->awayviewaiming = (angle_t)aim;
|
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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue