mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Deleted the Add_WallScroller function entirely from code.
Removed commented out instance using the function.
This commit is contained in:
parent
df9ad4a0e6
commit
c558900c61
1 changed files with 1 additions and 28 deletions
29
src/p_spec.c
29
src/p_spec.c
|
@ -6719,33 +6719,6 @@ static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT3
|
|||
P_AddThinker(&s->thinker);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/** Adds a wall scroller.
|
||||
* Scroll amount is rotated with respect to wall's linedef first, so that
|
||||
* scrolling towards the wall in a perpendicular direction is translated into
|
||||
* vertical motion, while scrolling along the wall in a parallel direction is
|
||||
* translated into horizontal motion.
|
||||
*
|
||||
* \param dx x speed of scrolling or its acceleration.
|
||||
* \param dy y speed of scrolling or its acceleration.
|
||||
* \param l Line whose front side will scroll.
|
||||
* \param control Sector whose heights control this scroller's effect
|
||||
* remotely, or -1 if there is no control sector.
|
||||
* \param accel Nonzero for an accelerative effect.
|
||||
* \sa Add_Scroller, P_SpawnScrollers
|
||||
*/
|
||||
static void Add_WallScroller(fixed_t dx, fixed_t dy, const line_t *l, INT32 control, INT32 accel)
|
||||
{
|
||||
fixed_t x = abs(l->dx), y = abs(l->dy), d;
|
||||
if (y > x)
|
||||
d = x, x = y, y = d;
|
||||
d = FixedDiv(x, FINESINE((tantoangle[FixedDiv(y, x) >> DBITS] + ANGLE_90) >> ANGLETOFINESHIFT));
|
||||
x = -FixedDiv(FixedMul(dy, l->dy) + FixedMul(dx, l->dx), d);
|
||||
y = -FixedDiv(FixedMul(dx, l->dy) - FixedMul(dy, l->dx), d);
|
||||
Add_Scroller(sc_side, x, y, control, *l->sidenum, accel, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Initializes the scrollers.
|
||||
*
|
||||
* \todo Get rid of all the magic numbers.
|
||||
|
@ -6828,7 +6801,7 @@ static void P_SpawnScrollers(void)
|
|||
case 502:
|
||||
for (s = -1; (s = P_FindLineFromLineTag(l, s)) >= 0 ;)
|
||||
if (s != (INT32)i)
|
||||
Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0); //Add_WallScroller(dx, dy, lines+s, control, accel);
|
||||
Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0);
|
||||
break;
|
||||
|
||||
case 505:
|
||||
|
|
Loading…
Reference in a new issue