Removed v3.2 backwards compatability and some playtest cvars

- Fork is now too different to maintain backwards compatability
This commit is contained in:
pierow 2023-08-08 21:26:52 -04:00
parent 21e6edcf2e
commit c7acee5e87
11 changed files with 23 additions and 80 deletions

View File

@ -527,7 +527,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
if ( (m_pPlayer->pev->button & IN_ATTACK) && !(m_pPlayer->pev->button & IN_ATTACK2))
{
if ((m_fInSpecialReload == 1 || m_fInSpecialReload == 2) && m_iClip != 0 && (CVAR_GET_FLOAT("sv_nsversion") > 322.0f))
if ((m_fInSpecialReload == 1 || m_fInSpecialReload == 2) && m_iClip != 0)
{
m_fInSpecialReload = 3;
Reload();

View File

@ -124,9 +124,7 @@ cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER};
cvar_t avh_jumpmode = {kvJumpMode, "1", FCVAR_SERVER};
cvar_t avh_version = {kvVersion, "330", FCVAR_SERVER};
//playtest cvars
cvar_t avh_newsgspread = {kvNewsgspread, "1", FCVAR_SERVER};
cvar_t avh_fastjp = {kvfastjp, "0", FCVAR_SERVER};
cvar_t avh_newlerk = {kvNewlerk, "1", FCVAR_SERVER};
#ifdef DEBUG
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
#endif
@ -239,9 +237,7 @@ void GameDLLInit( void )
CVAR_REGISTER (&avh_jumpmode);
CVAR_REGISTER (&avh_version);
//playtest cvars
CVAR_REGISTER (&avh_newsgspread);
CVAR_REGISTER (&avh_fastjp);
CVAR_REGISTER (&avh_newlerk);
// TODO: Remove
CVAR_REGISTER (&avh_ironman);

View File

@ -3167,21 +3167,11 @@ void CBasePlayer::Spawn( void )
else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm1", "0");
if (avh_fastjp.value == 0 && avh_version.value > 321)
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp", "1");
else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp", "0");
if (avh_fastjp.value == 1 && avh_version.value > 321)
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp2", "1");
else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp2", "0");
if (avh_newlerk.value == 1 && avh_version.value > 321)
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "nl", "1");
else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "nl", "0");
pev->fov = m_iFOV = 0;// init field of view.
m_iClientFOV = -1; // make sure fov reset is sent

View File

@ -990,7 +990,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
if ( theAttackPressed && m_pPlayer->GetCanUseWeapon())
{
if ((m_fInSpecialReload == 1 || m_fInSpecialReload == 2) && m_iClip != 0 && (CVAR_GET_FLOAT("sv_nsversion") > 322.0f))
if ((m_fInSpecialReload == 1 || m_fInSpecialReload == 2) && m_iClip != 0)
{
m_fInSpecialReload = 3;
Reload();

View File

@ -939,16 +939,10 @@ void EV_SonicGun(struct event_args_s* args)
// }
//EV_HLDM_FireBullets( idx, forward, right, up, kSGBulletsPerShot, vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx-1], VECTOR_CONE_20DEGREES.x, VECTOR_CONE_20DEGREES.y);
bool newpellets = (gHUD.GetServerVariableFloat(kvVersion) > 322.0f || gHUD.GetServerVariableFloat(kvNewsgspread) != 0.0f);
////Old 3.2 SG
//EV_HLDM_FireBulletsPlayer(idx, forward, right, up, 10, vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], kSGSpread, args->iparam1);
if (!newpellets)
{
EV_HLDM_FireBulletsPlayer(idx, forward, right, up, 10, vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], kSGSpread, args->iparam1);
}
else
{
EV_HLDM_FireBulletsPlayer(idx, forward, right, up, BALANCE_VAR(kSGBulletsPerShot), vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], kSGSpread, args->iparam1);
}
//}
// General x-punch axis

View File

@ -339,9 +339,7 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO)
RegisterServerVariable(&avh_structurelimit);
RegisterServerVariable(&avh_version);
//playtest cvars
RegisterServerVariable(&avh_newsgspread);
RegisterServerVariable(&avh_fastjp);
RegisterServerVariable(&avh_newlerk);
g_VoiceGameMgr.Init(&gVoiceHelper, gpGlobals->maxClients);

View File

@ -210,20 +210,9 @@ void AvHReloadableMarineWeapon::Reload(void)
float theGotoReloadAnimationTime = this->GetGotoReloadAnimationTime();
bool oldreload = (CVAR_GET_FLOAT("sv_nsversion") < 323.0f);
if (oldreload)
{
this->m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.1f;
this->m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.1f;
this->m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.1f;
this->m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.1f;
}
else
{
this->m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + theGotoReloadAnimationTime;
this->m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + theGotoReloadAnimationTime;
this->m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + theGotoReloadAnimationTime;
}
this->m_pPlayer->SetAnimation(PLAYER_RELOAD_START);

View File

@ -1632,7 +1632,7 @@ void AvHPlayer::GetAnimationForActivity(int inActivity, char outAnimation[64], b
break;
case ACT_RUN:
if (theIsGlidingOnGround && CVAR_GET_FLOAT("sv_newlerk") != 0)
if (theIsGlidingOnGround)
{
strcat(outAnimation, "jump");
break;

View File

@ -97,9 +97,7 @@ extern cvar_t avh_killdelay;
extern cvar_t *showtriggers;
extern cvar_t avh_version;
//playtest cvars
extern cvar_t avh_newsgspread;
extern cvar_t avh_fastjp;
extern cvar_t avh_newlerk;
char *ns_cvar_string(const cvar_t *cvar);
int ns_cvar_int(const cvar_t *cvar);
@ -150,7 +148,5 @@ float ns_cvar_float(const cvar_t *cvar);
#define kvJumpMode "sv_jumpmode"
#define kvVersion "sv_nsversion"
//playtest cvars
#define kvNewsgspread "sv_newsgspread"
#define kvfastjp "sv_fastjp"
#define kvNewlerk "sv_newlerk"
#endif

View File

@ -214,18 +214,11 @@ void AvHSonicGun::FireProjectiles(void)
// Fire the bullets and apply damage
//this->m_pPlayer->FireBullets(kSGBulletsPerShot, vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, 0, 0, theDamage);
// Client thinks these are 0 but this should run fine on the server. If client check is necessary, use gHUD.GetServerVariableFloat.
bool oldshotty = (CVAR_GET_FLOAT("sv_nsversion") < 323.0f || CVAR_GET_FLOAT("sv_newsgspread") == 0.0f);
////Old v3.2 SG spread
//this->m_pPlayer->FireBulletsPlayer(10, vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, BULLET_PLAYER_BUCKSHOT, 0, 17, 0, this->m_pPlayer->random_seed);
if (oldshotty)
{
this->m_pPlayer->FireBulletsPlayer(10, vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, BULLET_PLAYER_BUCKSHOT, 0, 17, 0, this->m_pPlayer->random_seed);
}
else
{
this->m_pPlayer->FireBulletsPlayer(BALANCE_VAR(kSGBulletsPerShot), vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, BULLET_PLAYER_BUCKSHOT, 0, theDamage, 0, this->m_pPlayer->random_seed);
}
}
bool AvHSonicGun::GetHasMuzzleFlash() const
{

View File

@ -2023,7 +2023,6 @@ void PM_PlayStepSound( int step, float fvol )
static int iSkipStep = 0;
int irand;
vec3_t hvel;
bool newlerk = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "nl"));
pmove->iStepLeft = !pmove->iStepLeft;
@ -2042,7 +2041,7 @@ void PM_PlayStepSound( int step, float fvol )
}
// Don't play footsteps if gliding
if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP && newlerk)
if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP)
{
return;
}
@ -3726,10 +3725,9 @@ void PM_CategorizePosition (void)
pmove->onground = tr.ent; // Otherwise, point to index of ent under us.
}
bool isglidinglerk = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP);
bool newlerk = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "nl"));
bool isGlidingLerk = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP);
if ( gIsJetpacking[pmove->player_index] == 0 && (!isglidinglerk && newlerk)) {
if ( gIsJetpacking[pmove->player_index] == 0 && !isGlidingLerk) {
// If we are on something...
if (pmove->onground != -1)
@ -4611,12 +4609,9 @@ bool PM_FlapMove()
}
else
{
bool newlerk = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "nl"));
// Added by mmcguire. Lerk gliding.
//if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->onground == -1)
//if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3/* && pmove->onground == -1*/)
if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && (newlerk || pmove->onground == -1))
if (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3)
{
// Compute the velocity not in the direction we're facing.
float theGlideAmount = min(0.2f, PM_GetHorizontalSpeed() / 1000);
@ -6354,8 +6349,7 @@ void PM_Jetpack()
// Turn off jetpack by default
gIsJetpacking[pmove->player_index] = false;
bool newjp = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "jp"));
bool fastjp = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "jp2"));
bool fastJp = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "jp2"));
if(!pmove->dead && theHasJetpackUpgrade && !theIsDevoured)
{
@ -6394,18 +6388,12 @@ void PM_Jetpack()
//pmove->velocity[0] += (theWishVelocity[0]/pmove->clientmaxspeed)*kJetpackLateralScalar;
//pmove->velocity[1] += (theWishVelocity[1]/pmove->clientmaxspeed)*kJetpackLateralScalar;
if (fastjp)
if (fastJp)
{
pmove->velocity[0] += ((theWishVelocity[0] / pmove->clientmaxspeed) * (theTimePassed * kJetpackForce) * 1.25f);
pmove->velocity[1] += ((theWishVelocity[1] / pmove->clientmaxspeed) * (theTimePassed * kJetpackForce) * 1.25f);
pmove->velocity[2] += theTimePassed * theWeightScalar*kJetpackForce;
}
else if (!newjp)
{
pmove->velocity[0] += (theWishVelocity[0]/pmove->clientmaxspeed)*12.0f;
pmove->velocity[1] += (theWishVelocity[1]/pmove->clientmaxspeed)*12.0f;
pmove->velocity[2] += theTimePassed * theWeightScalar*kJetpackForce;
}
else
{
pmove->velocity[0] += (theWishVelocity[0] / pmove->clientmaxspeed) * (theTimePassed * kJetpackForce);
@ -6736,12 +6724,11 @@ void PM_PlayerMove ( qboolean server )
pmove->flags &= ~FL_JUMPHELD;
}
bool isglidinglerk = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP);
bool newlerk = atoi(pmove->PM_Info_ValueForKey(pmove->physinfo, "nl"));
bool isGlidingLerk = (pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && pmove->cmd.buttons & IN_JUMP && pmove->oldbuttons & IN_JUMP);
// Fricion is handled before we add in any base velocity. That way, if we are on a conveyor,
// we don't slow when standing still, relative to the conveyor.
if ((pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && (!isglidinglerk || !newlerk)) || GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING))
if ((pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && !isGlidingLerk) || GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING))
{
if(!GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING))
pmove->velocity[2] = 0.0;
@ -6752,7 +6739,7 @@ void PM_PlayerMove ( qboolean server )
PM_CheckVelocity();
// Are we on ground now
if ( (pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && (!isglidinglerk || !newlerk)) || GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) )
if ( (pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && !isGlidingLerk) || GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) )
{
PM_WalkMove();
}
@ -6782,7 +6769,7 @@ void PM_PlayerMove ( qboolean server )
}
// If we are on ground, no downward velocity.
if ((pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && (!isglidinglerk || !newlerk)) && !GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING))
if ((pmove->onground != -1 && gIsJetpacking[pmove->player_index] == 0 && !isGlidingLerk) && !GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING))
{
pmove->velocity[2] = 0;
}