mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
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
1 changed files with 15 additions and 10 deletions
25
src/p_spec.c
25
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
|
||||
// This is not revoked until overwritten; awayviewtics is ignored
|
||||
if (titlemapinaction)
|
||||
{
|
||||
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
|
||||
{
|
||||
INT32 aim;
|
||||
|
||||
aim = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
||||
while (aim < 0)
|
||||
aim += 360;
|
||||
while (aim >= 360)
|
||||
aim -= 360;
|
||||
aim = (aim + 360) % 360;
|
||||
aim *= (ANGLE_90>>8);
|
||||
aim /= 90;
|
||||
aim <<= 8;
|
||||
mo->player->awayviewaiming = (angle_t)aim;
|
||||
if (titlemapinaction)
|
||||
titlemapcameraref->cusval = (angle_t)aim;
|
||||
else
|
||||
mo->player->awayviewaiming = (angle_t)aim;
|
||||
}
|
||||
else
|
||||
mo->player->awayviewaiming = 0; // straight ahead
|
||||
{
|
||||
// straight ahead
|
||||
if (!titlemapinaction)
|
||||
mo->player->awayviewaiming = 0;
|
||||
// don't do cusval cause that's annoying
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue