mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Duke/RR: Add scaling to mouse input within motoApplyTurn()
and boatApplyTurn()
.
This commit is contained in:
parent
f0b9029726
commit
a52ee89969
1 changed files with 5 additions and 5 deletions
|
@ -626,10 +626,10 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
p->TiltStatus = -10;
|
||||
|
||||
if (kbdLeft)
|
||||
turnvel += turnheldtime >= TURBOTURNTIME && p->MotoSpeed > 0 ? -baseVel : -baseVel * (3. / 10.);
|
||||
turnvel -= turnheldtime >= TURBOTURNTIME && p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.);
|
||||
|
||||
if (hidInput->mouseturnx < 0)
|
||||
turnvel -= sqrt((p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * -(hidInput->mouseturnx / factor));
|
||||
turnvel -= sqrt((p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * -(hidInput->mouseturnx / factor) * 2.);
|
||||
|
||||
if (hidInput->dyaw < 0)
|
||||
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * hidInput->dyaw;
|
||||
|
@ -647,7 +647,7 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
turnvel += turnheldtime >= TURBOTURNTIME && p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.);
|
||||
|
||||
if (hidInput->mouseturnx > 0)
|
||||
turnvel += sqrt((p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * (hidInput->mouseturnx / factor));
|
||||
turnvel += sqrt((p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * (hidInput->mouseturnx / factor) * 2.);
|
||||
|
||||
if (hidInput->dyaw > 0)
|
||||
turnvel += (p->MotoSpeed > 0 ? baseVel : baseVel * (3. / 10.)) * hidInput->dyaw;
|
||||
|
@ -705,7 +705,7 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
turnvel -= turnheldtime >= TURBOTURNTIME ? baseVel : baseVel * velScale;
|
||||
|
||||
if (hidInput->mouseturnx < 0)
|
||||
turnvel -= sqrt(baseVel * -(hidInput->mouseturnx / factor));
|
||||
turnvel -= sqrt(baseVel * -(hidInput->mouseturnx / factor) * 2.);
|
||||
|
||||
if (hidInput->dyaw < 0)
|
||||
turnvel += baseVel * hidInput->dyaw;
|
||||
|
@ -726,7 +726,7 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
turnvel += turnheldtime >= TURBOTURNTIME ? baseVel : baseVel * velScale;
|
||||
|
||||
if (hidInput->mouseturnx > 0)
|
||||
turnvel += sqrt(baseVel * (hidInput->mouseturnx / factor));
|
||||
turnvel += sqrt(baseVel * (hidInput->mouseturnx / factor) * 2.);
|
||||
|
||||
if (hidInput->dyaw > 0)
|
||||
turnvel += baseVel * hidInput->dyaw;
|
||||
|
|
Loading…
Reference in a new issue