NX/VITA: Properly utilize QuakeC maxspeed

This commit is contained in:
cypress 2023-09-02 19:45:43 -04:00
parent 6f92348472
commit 3ccfe3530e
2 changed files with 7 additions and 133 deletions

View file

@ -368,114 +368,6 @@ Send the intended movement message to the server
================
*/
float speed_reduce (int weapontype)
{
if (weapontype == W_COLT)
return 1;
else if (weapontype == W_KAR)
return 0.9;
else if (weapontype == W_THOMPSON)
return 1;
//else if (weapontype == W_BIATCH)
// return 1;
else if (weapontype == W_357)
return 0.9;
else if (weapontype == W_GEWEHR)
return 0.9;
else if (weapontype == W_M1)
return 0.9;
else if (weapontype == W_RAY)
return 1;
else if (weapontype == W_M1A1)
return 0.9;
else if (weapontype == W_M2)
return 0.67;
//else if (weapontype == W_TESLA)
// return 1;
else if (weapontype == W_TYPE)
return 1;
else if (weapontype == W_MP40)
return 1;
else if (weapontype == W_STG)
return 1;
else if (weapontype == W_SAWNOFF)
return 1;
else if (weapontype == W_DB)
return 1;
else if (weapontype == W_FG)
return 1;
else if (weapontype == W_MG)
return 0.75;
else if (weapontype == W_BROWNING)
return 0.75;
else if (weapontype == W_TRENCH)
return 1;
else if (weapontype == W_PPSH)
return 1;
else if(weapontype == W_KAR_SCOPE)//FIXME
return 0.9;
else if (weapontype == W_PANZER)
return 0.75;
else if(weapontype == W_PTRS)
return 0.75;
else if(weapontype == W_BAR)
return 1;
else if(weapontype == W_BK)//FIXME
return 1;/*
else if (weapontype == W_KILLU)
return 0.9;
else if (weapontype == W_COMPRESSOR)
return 0.9;
else if (weapontype == W_M1000)
return 0.9;
else if (weapontype == W_KOLLIDER)//FIXME
return 1;
else if (weapontype == W_PORTER)
return 1;
else if (weapontype == W_WIDDER)
return 0.9;
else if (weapontype == W_FIW)
return 0.85;
else if (weapontype == W_ARMAGEDDON)
return 0.9;
else if (weapontype == W_WUNDER)
return 1;
else if (weapontype == W_GIBS)
return 1;
else if (weapontype == W_SAMURAI)
return 1;
else if (weapontype == W_AFTERBURNER)
return 1;
else if (weapontype == W_SPATZ)
return 1;
else if (weapontype == W_SNUFF)
return 1;
else if (weapontype == W_BORE)
return 1;
else if (weapontype == W_IMPELLER)
return 1;
else if (weapontype == W_BARRACUDA)
return 0.75;
else if (weapontype == W_ACCELERATOR)
return 0.75;
else if (weapontype == W_GUT)
return 1;
else if (weapontype == W_REAPER)
return 1;
else if(weapontype == W_HEADCRACKER)
return 0.9;
else if (weapontype == W_LONGINUS)
return 1;
else if(weapontype == W_PENETRATOR)
return 0.75;
else if(weapontype == W_WIDOW)
return 1;
else if(weapontype == W_KRAUS)
return 1;*/
else
return 1;
}
float cl_backspeed;
float cl_forwardspeed;
float cl_sidespeed;
@ -492,26 +384,12 @@ void CL_BaseMove (usercmd_t *cmd)
Q_memset (cmd, 0, sizeof(*cmd));
if (cl.stats[STAT_HEALTH] < 20)
cl_backspeed = cl_forwardspeed = cl_sidespeed = 30;
else
cl_backspeed = cl_forwardspeed = cl_sidespeed = 140;//190
// Moto - we handle movespeed in QC now.
cl_backspeed = cl_forwardspeed = cl_sidespeed = sv_player->v.maxspeed*0.71;
cl_sidespeed = cl_sidespeed*speed_reduce(cl.stats[STAT_ACTIVEWEAPON]);
if (cl.stats[STAT_ZOOM] == 1)
cl_sidespeed = cl_sidespeed*0.5;
else if (cl.stats[STAT_ZOOM] == 2)
cl_sidespeed = cl_sidespeed*0.5;
else if (cl.stats[STAT_ZOOM] == 3)
cl_sidespeed = cl_sidespeed*1.66;
if (cl.perks & 32)
cl_sidespeed = cl_sidespeed*1.07;
cl_backspeed = cl_forwardspeed = cl_sidespeed;
cl_sidespeed = cl_sidespeed*0.8;
cl_backspeed = cl_backspeed*0.7;
// Throttle side and back speeds
cl_sidespeed *= 0.8;
cl_backspeed *= 0.7;
if (waypoint_mode.value)
cl_backspeed = cl_forwardspeed = cl_sidespeed *= 1.5;

View file

@ -173,8 +173,6 @@ float PlayStepSound(void)
return sound;
}
float speed_reduce (int weapontype);
#define VBOB_VAL 5.2
float V_CalcVBob(float speed, float which)
@ -187,7 +185,7 @@ float V_CalcVBob(float speed, float which)
float sprint = 1;
if(cl.stats[STAT_ZOOM] == 3)
sprint = 1.8 * speed_reduce (cl.stats[STAT_ACTIVEWEAPON]);
sprint = 1.8;
if(cl.stats[STAT_ZOOM] == 2)
return 0;
@ -227,15 +225,13 @@ float V_CalcVBob(float speed, float which)
}
// Blub's new V_CalcBob code, both side and pitch are in one, dictated by the (which) parameter
float speed_reduce (int weapontype);
float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing
{
float bob = 0;
float sprint = 1;
if(cl.stats[STAT_ZOOM] == 3)
sprint = 1.8 * speed_reduce (cl.stats[STAT_ACTIVEWEAPON]);//this gets sprinting speed in comparison to walk speed per weapon
sprint = 1.8; //this gets sprinting speed in comparison to walk speed per weapon
if(cl.stats[STAT_ZOOM] == 2)
return 0;
//12.048 -> 4.3 = 100 -> 36ish, so replace 100 with 36