mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Merge branch 'master' of c:\programming\doom-dev\zdoom
This commit is contained in:
commit
c59fd26d8a
1 changed files with 7 additions and 3 deletions
|
@ -147,8 +147,8 @@ static void RotationComp(const sector_t *sec, int which, double dx, double dy, d
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double ca = an.Cos();
|
double ca = -an.Cos();
|
||||||
double sa = an.Sin();
|
double sa = -an.Sin();
|
||||||
tdx = dx*ca - dy*sa;
|
tdx = dx*ca - dy*sa;
|
||||||
tdy = dy*ca + dx*sa;
|
tdy = dy*ca + dx*sa;
|
||||||
}
|
}
|
||||||
|
@ -345,12 +345,16 @@ DScroller::DScroller (double dx, double dy, const line_t *l,
|
||||||
int control, int accel, EScrollPos scrollpos)
|
int control, int accel, EScrollPos scrollpos)
|
||||||
: DThinker (STAT_SCROLLER)
|
: DThinker (STAT_SCROLLER)
|
||||||
{
|
{
|
||||||
|
if (tagManager.GetFirstLineID(l) == 300)
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
double x = fabs(l->Delta().X), y = fabs(l->Delta().Y), d;
|
double x = fabs(l->Delta().X), y = fabs(l->Delta().Y), d;
|
||||||
if (y > x) d = x, x = y, y = d;
|
if (y > x) d = x, x = y, y = d;
|
||||||
|
|
||||||
d = x / g_sin(g_atan2(y, x) + M_PI / 2);
|
d = x / g_sin(g_atan2(y, x) + M_PI / 2);
|
||||||
x = (-dy * l->Delta().Y + dx * l->Delta().X) / d;
|
x = (-dy * l->Delta().Y + dx * l->Delta().X) / d;
|
||||||
y = (-dx * l->Delta().Y - dy * l->Delta().Y) / d;
|
y = (-dx * l->Delta().Y - dy * l->Delta().X) / d;
|
||||||
|
|
||||||
m_Type = EScroll::sc_side;
|
m_Type = EScroll::sc_side;
|
||||||
m_dx = x;
|
m_dx = x;
|
||||||
|
|
Loading…
Reference in a new issue