Use new let syntax for multiple returns.
This commit is contained in:
parent
c636e0e787
commit
525b9e33eb
46 changed files with 143 additions and 244 deletions
|
|
@ -99,8 +99,7 @@ extend Class Demolitionist
|
|||
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
|
||||
{
|
||||
double fs = TweakSpeed();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 accel;
|
||||
if ( (player.cmd.upmove == -32768) || sendtoground )
|
||||
{
|
||||
|
|
@ -173,8 +172,7 @@ extend Class Demolitionist
|
|||
if ( player.cmd.buttons&BT_JUMP ) jcmove += 4096.;
|
||||
if ( player.cmd.buttons&BT_CROUCH ) jcmove -= 4096.;
|
||||
if ( CanCrouch() && (player.crouchfactor != -1) ) fs *= player.crouchfactor;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector2 nmove = NormalizedMove();
|
||||
Vector3 accel = x*nmove.x-y*nmove.y+z*jcmove;
|
||||
accel *= fs/320.;
|
||||
|
|
@ -204,8 +202,7 @@ extend Class Demolitionist
|
|||
if ( player.cmd.forwardmove|player.cmd.sidemove )
|
||||
{
|
||||
double bobfactor;
|
||||
double friction, movefactor;
|
||||
[friction, movefactor] = GetFriction();
|
||||
let [friction, movefactor] = GetFriction();
|
||||
bobfactor = (friction<ORIG_FRICTION)?movefactor:ORIG_FRICTION_FACTOR;
|
||||
if ( !player.onground && !bNoGravity )
|
||||
{
|
||||
|
|
@ -298,8 +295,8 @@ extend Class Demolitionist
|
|||
else lastairtic = level.maptime;
|
||||
if ( !(player.cheats & CF_PREDICTING) && !(player.cmd.forwardmove|player.cmd.sidemove) )
|
||||
PlayIdle();
|
||||
Vector3 dodge = (0,0,0), x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 dodge = (0,0,0);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
int fm = player.cmd.forwardmove;
|
||||
int sm = player.cmd.sidemove;
|
||||
if ( !(fm|sm) ) fm = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue