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_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; m_fInSpecialReload = 3;
Reload(); 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_jumpmode = {kvJumpMode, "1", FCVAR_SERVER};
cvar_t avh_version = {kvVersion, "330", FCVAR_SERVER}; cvar_t avh_version = {kvVersion, "330", FCVAR_SERVER};
//playtest cvars //playtest cvars
cvar_t avh_newsgspread = {kvNewsgspread, "1", FCVAR_SERVER};
cvar_t avh_fastjp = {kvfastjp, "0", FCVAR_SERVER}; cvar_t avh_fastjp = {kvfastjp, "0", FCVAR_SERVER};
cvar_t avh_newlerk = {kvNewlerk, "1", FCVAR_SERVER};
#ifdef DEBUG #ifdef DEBUG
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER}; cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
#endif #endif
@ -239,9 +237,7 @@ void GameDLLInit( void )
CVAR_REGISTER (&avh_jumpmode); CVAR_REGISTER (&avh_jumpmode);
CVAR_REGISTER (&avh_version); CVAR_REGISTER (&avh_version);
//playtest cvars //playtest cvars
CVAR_REGISTER (&avh_newsgspread);
CVAR_REGISTER (&avh_fastjp); CVAR_REGISTER (&avh_fastjp);
CVAR_REGISTER (&avh_newlerk);
// TODO: Remove // TODO: Remove
CVAR_REGISTER (&avh_ironman); CVAR_REGISTER (&avh_ironman);

View File

@ -3167,21 +3167,11 @@ void CBasePlayer::Spawn( void )
else else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jm1", "0"); 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) if (avh_fastjp.value == 1 && avh_version.value > 321)
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp2", "1"); g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp2", "1");
else else
g_engfuncs.pfnSetPhysicsKeyValue(edict(), "jp2", "0"); 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. pev->fov = m_iFOV = 0;// init field of view.
m_iClientFOV = -1; // make sure fov reset is sent 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 ( 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; m_fInSpecialReload = 3;
Reload(); Reload();

View File

@ -938,17 +938,11 @@ void EV_SonicGun(struct event_args_s* args)
// AvHParticleSystemManager::Instance()->CreateParticleSystem(kpsShotgun, theBarrelTip); // AvHParticleSystemManager::Instance()->CreateParticleSystem(kpsShotgun, theBarrelTip);
// } // }
//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); //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);
if (!newpellets) ////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);
EV_HLDM_FireBulletsPlayer(idx, forward, right, up, 10, vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], kSGSpread, args->iparam1);
} EV_HLDM_FireBulletsPlayer(idx, forward, right, up, BALANCE_VAR(kSGBulletsPerShot), 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 // General x-punch axis

View File

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

View File

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

View File

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

View File

@ -97,9 +97,7 @@ extern cvar_t avh_killdelay;
extern cvar_t *showtriggers; extern cvar_t *showtriggers;
extern cvar_t avh_version; extern cvar_t avh_version;
//playtest cvars //playtest cvars
extern cvar_t avh_newsgspread;
extern cvar_t avh_fastjp; extern cvar_t avh_fastjp;
extern cvar_t avh_newlerk;
char *ns_cvar_string(const cvar_t *cvar); char *ns_cvar_string(const cvar_t *cvar);
int ns_cvar_int(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 kvJumpMode "sv_jumpmode"
#define kvVersion "sv_nsversion" #define kvVersion "sv_nsversion"
//playtest cvars //playtest cvars
#define kvNewsgspread "sv_newsgspread"
#define kvfastjp "sv_fastjp" #define kvfastjp "sv_fastjp"
#define kvNewlerk "sv_newlerk"
#endif #endif

View File

@ -214,17 +214,10 @@ void AvHSonicGun::FireProjectiles(void)
// Fire the bullets and apply damage // Fire the bullets and apply damage
//this->m_pPlayer->FireBullets(kSGBulletsPerShot, vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, 0, 0, theDamage); //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. ////Old v3.2 SG spread
bool oldshotty = (CVAR_GET_FLOAT("sv_nsversion") < 323.0f || CVAR_GET_FLOAT("sv_newsgspread") == 0.0f); //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(BALANCE_VAR(kSGBulletsPerShot), vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, BULLET_PLAYER_BUCKSHOT, 0, theDamage, 0, this->m_pPlayer->random_seed);
{
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 bool AvHSonicGun::GetHasMuzzleFlash() const

View File

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