playtest cvar additions

This commit is contained in:
pierow 2021-01-23 18:51:30 -05:00
parent 43b6debd50
commit a1f5c3ed0d
8 changed files with 35 additions and 7 deletions

View file

@ -2393,8 +2393,8 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn
}*/
if (strstr(filename, "dlls/") != NULL) {
sprintf(disconnect_message, "(%s) Your NS version differs from the server's. Go to github.com/ENSL/NS#downloads or run Natural Launcher for the latest version.\n", filename);
//sprintf(disconnect_message, "(%s) This server is running an experimental NS build. Enable experimental build in Natural Launcher settings. github.com/ENSL/NS#downloads\n", filename);
//sprintf(disconnect_message, "(%s) Your NS version differs from the server's. Go to github.com/ENSL/NS#downloads or run Natural Launcher for the latest version.\n", filename);
sprintf(disconnect_message, "(%s) This server is running an experimental NS build. Enable experimental build in Natural Launcher settings. github.com/ENSL/NS#downloads\n", filename);
return 1;
}

View file

@ -123,6 +123,9 @@ cvar_t avh_mapvoteratio = {kvMapVoteRatio, ".6", FCVAR_SERVER};
cvar_t avh_blockscripts = {kvBlockScripts, "1", FCVAR_SERVER};
cvar_t avh_jumpmode = {kvJumpMode, "1", FCVAR_SERVER};
cvar_t avh_version = {kvVersion, "323", FCVAR_SERVER };
//playtest cvars
cvar_t avh_newsgspread = {kvNewsgspread, "1", FCVAR_SERVER };
cvar_t avh_fastjp = {kvfastjp, "0", FCVAR_SERVER };
#ifdef DEBUG
cvar_t avh_testing = {kvTesting, "0", FCVAR_SERVER};
#endif
@ -234,6 +237,9 @@ void GameDLLInit( void )
CVAR_REGISTER (&avh_blockscripts);
CVAR_REGISTER (&avh_jumpmode);
CVAR_REGISTER (&avh_version);
//playtest cvars
CVAR_REGISTER (&avh_newsgspread);
CVAR_REGISTER (&avh_fastjp);
// TODO: Remove
CVAR_REGISTER (&avh_ironman);

View file

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

View file

@ -938,7 +938,7 @@ 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);
if (CVAR_GET_FLOAT("sv_nsversion") < 323.0f)
if ((CVAR_GET_FLOAT("sv_nsversion") < 323.0f) || (CVAR_GET_FLOAT("sv_newsgspread") == 0.0f))
{
EV_HLDM_FireBulletsPlayer(idx, forward, right, up, 10, vecSrc, vecAiming, kSGRange, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], kSGSpread, args->iparam1);
}

View file

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

View file

@ -96,6 +96,9 @@ extern cvar_t *violence_agibs;
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;
char *ns_cvar_string(const cvar_t *cvar);
int ns_cvar_int(const cvar_t *cvar);
@ -145,5 +148,7 @@ float ns_cvar_float(const cvar_t *cvar);
#define kvBlockScripts "mp_blockscripts"
#define kvJumpMode "sv_jumpmode"
#define kvVersion "sv_nsversion"
//playtest cvars
#define kvNewsgspread "sv_newsgspread"
#define kvfastjp "sv_fastjp"
#endif

View file

@ -215,7 +215,8 @@ void AvHSonicGun::FireProjectiles(void)
//this->m_pPlayer->FireBullets(kSGBulletsPerShot, vecSrc, vecAiming, this->GetProjectileSpread(), this->mRange, 0, 0, theDamage);
bool oldshotty = (CVAR_GET_FLOAT("sv_nsversion") < 323.0f);
if (oldshotty)
if (oldshotty || (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);
}

View file

@ -6341,6 +6341,7 @@ void PM_Jetpack()
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"));
if(!pmove->dead && theHasJetpackUpgrade && !theIsDevoured)
{
@ -6378,7 +6379,14 @@ void PM_Jetpack()
// Old lateral jetpack code - acceleration scales with framerate
//pmove->velocity[0] += (theWishVelocity[0]/pmove->clientmaxspeed)*kJetpackLateralScalar;
//pmove->velocity[1] += (theWishVelocity[1]/pmove->clientmaxspeed)*kJetpackLateralScalar;
if (!newjp)
if (fastjp)
{
pmove->velocity[0] += (theWishVelocity[0] / pmove->clientmaxspeed) * (theTimePassed * theWeightScalar * 1562.5f);
pmove->velocity[1] += (theWishVelocity[1] / pmove->clientmaxspeed) * (theTimePassed * theWeightScalar * 1562.5f);
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;