presets update

- add network rate presets
- add cl_intensityalt for alternative gamma ramp in env_gamma map entities
- separate welder flickering dynamic light setting
- crosshair updates
This commit is contained in:
pierow 2024-03-10 16:58:37 -04:00
parent 833eb0a792
commit 90ebbdda23
41 changed files with 267 additions and 78 deletions

View file

@ -90,7 +90,8 @@ cl_idealpitchscale "0.8"
cl_labelhivesight "1"
cl_labelmaps "1"
cl_lc "1"
cl_intensity "1"
cl_intensity "0.55"
cl_intensityalt "1"
cl_logocolor "#Valve_Orange"
cl_logofile "lambda"
cl_lw "1"
@ -110,12 +111,12 @@ crosshair "0"
fps_max "250"
fps_override "1"
fps_modem "0.0"
gamma "2.5"
gamma "2.95"
gl_dither "1"
gl_flipmatrix "0"
gl_fog "1"
gl_monolights "0"
gl_overbright "1"
gl_overbright "0"
gl_polyoffset "0.1"
gl_texturemode "GL_LINEAR_MIPMAP_LINEAR"
gl_use_shaders "0"

View file

@ -5,6 +5,10 @@ lightgamma "2"
cl_dynamiclights "0"
cl_postprocess "0"
cl_intensity "0"
cl_intensityalt "1"
// High detail particles
cl_high_detail "0"
// No bobbing
cl_bob "0"
@ -36,4 +40,4 @@ echo "----------------------------------------------------------------------"
echo "- Bright lighting settings with overbright shader disabled"
echo "- Nine Legends competitive HUD and new crosshair system"
echo "- No weapon of view bobbing"
echo "- Ambient sound and music disabled"
echo "- Ambient sound and music tracks disabled"

View file

@ -1,10 +1,14 @@
// Lighting - temporary until new gamma ramp shader.
// Lighting
brightness "0"
gamma "2.5"
gamma "2.95"
lightgamma "1.81"
cl_dynamiclights "0"
cl_postprocess "1"
cl_intensity "1"
cl_intensity "0.55"
cl_intensityalt "1"
// High detail particles
cl_high_detail "1"
// Bobbing
cl_bob "0.006"
@ -35,8 +39,8 @@ echo " "
echo "----------------------------------------------------------------------"
echo "NS 3.3 graphics and audio preset applied"
echo "----------------------------------------------------------------------"
echo "- Brighter shadows. Flashing dynamic lights disabled."
echo "- Brighter shadows. Reduced overbrightening. Flashing dynamic lights disabled."
echo "- Minimal marine HUD and new crosshair system."
echo "- Reduced weapon bobbing and no view bobbing."
echo "- Reduced ambient sound and music volumes. Music tracks play only once at the start of the round."
echo "- Reduced ambient and music track volumes. Music tracks play only once at the start of the round."
echo " "

View file

@ -5,6 +5,10 @@ lightgamma "2.5"
cl_dynamiclights "1"
cl_postprocess "1"
cl_intensity "1"
cl_intensityalt "0"
// High detail particles
cl_high_detail "1"
// Bobbing
cl_bob "0.01"
@ -27,7 +31,6 @@ cl_hudmapzoom "3"
// Legacy sprite crosshairs
crosshair "1"
cl_cross "0"
//cl_weaponcfgs "0"
echo " "

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "255"
cl_updaterate "100"
cl_cmdbackup "2"
ex_interp "0.01"

View file

@ -0,0 +1,5 @@
rate "20000"
cl_cmdrate "60"
cl_updaterate "30"
cl_cmdbackup "2"
ex_interp "0.1"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "255"
cl_updaterate "100"
cl_cmdbackup "2"
ex_interp "0.02"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "255"
cl_updaterate "100"
cl_cmdbackup "2"
ex_interp "0.033333"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "255"
cl_updaterate "100"
cl_cmdbackup "2"
ex_interp "0.05"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "100"
cl_updaterate "100"
cl_cmdbackup "2"
ex_interp "0.05"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "100"
cl_updaterate "60"
cl_cmdbackup "2"
ex_interp "0.05"

View file

@ -0,0 +1,5 @@
rate "100000"
cl_cmdrate "60"
cl_updaterate "60"
cl_cmdbackup "2"
ex_interp "0.05"

View file

@ -0,0 +1,5 @@
rate "30000"
cl_cmdrate "60"
cl_updaterate "60"
cl_cmdbackup "2"
ex_interp "0.1"

View file

@ -0,0 +1,5 @@
rate "30000"
cl_cmdrate "60"
cl_updaterate "30"
cl_cmdbackup "2"
ex_interp "0.1"

View file

@ -101,5 +101,12 @@ mp_uplink 1
// Needed so this file is executed on map change, like pre-NS v2.1
mapchangecfgfile server.cfg
//Post HL 25th Aniversary update
// Post HL 25th Aniversary update
sv_rollangle 0
// Set rate limits, otherwise they initialize to bad values
sv_maxupdaterate 102
sv_maxunlag 0.25
sv_maxrate 0
sv_minrate 20000
sv_minupdaterate 30

View file

@ -510,27 +510,7 @@ void WeaponsResource::SetCurrentWeapon(WEAPON* newWeapon)
if (gHUD.GetHUDUser3() == AVH_USER3_ALIEN_PLAYER2 && !healSprayAttack2Active)
{
healSprayLastWeapon = newWeapon;
gEngfuncs.Con_Printf("healspray last change\n");
}
const float wCfgCvar = CVAR_GET_FLOAT("cl_weaponcfgs");
char weapCfg[128];
if (wCfgCvar == 1.0f)
{
ClientCmd("exec weaponcfgs/default.cfg");
sprintf(weapCfg, "exec weaponcfgs/%s.cfg", newWeapon->szName);
ClientCmd(weapCfg);
}
else if (wCfgCvar == 2.0f)
{
ClientCmd("exec weaponcfgs/nsdefaults/default.cfg");
sprintf(weapCfg, "exec weaponcfgs/nsdefaults/%s.cfg", newWeapon->szName);
ClientCmd(weapCfg);
}
}
ServerCmd(newWeapon->szName);
@ -765,15 +745,49 @@ void CHudAmmo::Think(void)
}
WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon
{
WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
if(!gWR.IsSelectable(currentWeapon)) //current weapon isn't valid
{
gWR.SetValidWeapon(); //get best option
}
}
if (gHUD.GetCurrentWeaponID() != m_crossLastWeapId)
{
m_crossLastWeapId = gHUD.GetCurrentWeaponID();
const float wCfgCvar = CVAR_GET_FLOAT("cl_weaponcfgs");
char weapCfg[128];
if (wCfgCvar == 1.0f)
{
ClientCmd("exec weaponcfgs/default.cfg");
if (!currentWeapon)
{
ClientCmd("exec weaponcfgs/noweapon.cfg");
}
else
{
snprintf(weapCfg, 128, "exec weaponcfgs/%s.cfg", currentWeapon->szName);
ClientCmd(weapCfg);
}
}
else if (wCfgCvar == 2.0f)
{
if (!currentWeapon)
{
ClientCmd("exec weaponcfgs/nsdefaults/noweapon.cfg");
}
else
{
snprintf(weapCfg, 128, "exec weaponcfgs/nsdefaults/%s.cfg", currentWeapon->szName);
ClientCmd(weapCfg);
}
}
}
if (!gpActiveSel)
return;

View file

@ -78,7 +78,6 @@ private:
int riAmmo[MAX_AMMO_TYPES]; // current ammo counts
int iOldWeaponBits;
int lastWeaponId;
};
extern WeaponsResource gWR;

View file

@ -121,6 +121,7 @@ private:
int m_HUD_bucket0;
int m_HUD_selection;
int m_customCrosshair;
int m_crossLastWeapId;
};

View file

@ -10,13 +10,13 @@ int CHudCrosshairs::Init()
{
m_iFlags = HUD_ACTIVE;
cl_cross = CVAR_CREATE("cl_cross", "0", FCVAR_ARCHIVE);
cl_cross = CVAR_CREATE("cl_cross", "1", FCVAR_ARCHIVE);
cl_cross_color = CVAR_CREATE("cl_cross_color", "255 255 255", FCVAR_ARCHIVE);
cl_cross_alpha = CVAR_CREATE("cl_cross_alpha", "255", FCVAR_ARCHIVE);
cl_cross_thickness = CVAR_CREATE("cl_cross_thickness", "1", FCVAR_ARCHIVE);
cl_cross_thickness = CVAR_CREATE("cl_cross_thickness", "2", FCVAR_ARCHIVE);
cl_cross_size = CVAR_CREATE("cl_cross_size", "6", FCVAR_ARCHIVE);
cl_cross_gap = CVAR_CREATE("cl_cross_gap", "3", FCVAR_ARCHIVE);
cl_cross_outline = CVAR_CREATE("cl_cross_outline", "2", FCVAR_ARCHIVE);
cl_cross_outline = CVAR_CREATE("cl_cross_outline", "1", FCVAR_ARCHIVE);
cl_cross_outline_alpha = CVAR_CREATE("cl_cross_outline_alpha", "", FCVAR_ARCHIVE);
cl_cross_outline_inner = CVAR_CREATE("cl_cross_outline_inner", "0", FCVAR_ARCHIVE);
cl_cross_circle_radius = CVAR_CREATE("cl_cross_circle_radius", "0", FCVAR_ARCHIVE);

View file

@ -136,7 +136,6 @@ cvar_t *cl_highdetail;
cvar_t *cl_cmhotkeys;
//cvar_t *cl_forcedefaultfov;
cvar_t *cl_dynamiclights;
cvar_t *r_dynamic;
cvar_t *cl_buildmessages;
cvar_t *cl_particleinfo;
//cvar_t *cl_widescreen;
@ -1541,7 +1540,7 @@ void NsPreset(void)
switch (presetChoice)
{
case 1:
ClientCmd("exec 32av.cfg");
ClientCmd("exec presetcfgs/AV/ns32.cfg");
if (printToChat)
{
@ -1557,7 +1556,7 @@ void NsPreset(void)
}
break;
case 2:
ClientCmd("exec 33av.cfg");
ClientCmd("exec presetcfgs/AV/newdefault.cfg");
if (printToChat)
{
@ -1573,7 +1572,7 @@ void NsPreset(void)
}
break;
case 3:
ClientCmd("exec compav.cfg");
ClientCmd("exec presetcfgs/AV/competitive.cfg");
if (printToChat)
{
@ -1593,6 +1592,24 @@ void NsPreset(void)
}
}
void NsRates(void)
{
int ratesChoice = atoi(gEngfuncs.Cmd_Argv(1));
char execText[30];
if (ratesChoice >= 1 && ratesChoice <= 20)
{
snprintf(execText, 30, "exec presetcfgs/rates/%d.cfg", ratesChoice);
ClientCmd(execText);
}
// Don't show this if 0 is entered as an arg, as it's the normal behavior for the blank default setting in options.
else if (gEngfuncs.Cmd_Argc() <= 1 || ratesChoice != 0)
{
gEngfuncs.Con_Printf("nsrates selects from preset network rate commands. Start from \"nsrates 1\" and increase the number until your connection feels stable.\n");
}
}
/*
============
InitInput
@ -1668,6 +1685,7 @@ void InitInput (void)
gEngfuncs.pfnAddCommand("nsversion", NsVersion);
gEngfuncs.pfnAddCommand("echodev", EchoDev);
gEngfuncs.pfnAddCommand("nspreset", NsPreset);
gEngfuncs.pfnAddCommand("nsrates", NsRates);
lookstrafe = gEngfuncs.pfnRegisterVariable ( "lookstrafe", "0", FCVAR_ARCHIVE );
lookspring = gEngfuncs.pfnRegisterVariable ( "lookspring", "0", FCVAR_ARCHIVE );

View file

@ -34,6 +34,7 @@ void CPostProcessShader::Init()
cl_postprocess = CVAR_CREATE("cl_postprocess", "1", FCVAR_ARCHIVE);
cl_intensity = CVAR_CREATE("cl_intensity", "1", FCVAR_ARCHIVE);
CVAR_CREATE("cl_intensityalt", "1", FCVAR_ARCHIVE);
// Store shaders in dll so swapping in different ones is harder.
const std::string vertShader =

View file

@ -272,7 +272,10 @@ void GameDLLInit( void )
CVAR_REGISTER (&avh_uplink);
CVAR_REGISTER (&avh_killdelay);
//Remove HL25 addition of roll angle and overbright shader in code so servers don't need to update configs.
// Initialize rates for servers that have old configs without them.
CVAR_SET_FLOAT("sv_maxupdaterate", 102.0f);
CVAR_SET_FLOAT("sv_maxunlag", 0.25f);
// Remove HL25 addition of roll angle and overbright shader in code so servers don't need to update configs.
CVAR_SET_FLOAT("sv_rollangle", 0.0f);
CVAR_SET_FLOAT("sv_allow_shaders", 0.0f);

View file

@ -776,6 +776,7 @@ BOOL AvHGamerules::ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
if(this->GetCheatsEnabled())
{
sscanf(CMD_ARGV(1), "%f", &this->mMapGamma);
sscanf(CMD_ARGV(1), "%f", &this->mMapGammaAlt);
}
theSuccess = true;
}

View file

@ -1035,9 +1035,16 @@ AvHGamma::AvHGamma()
void AvHGamma::KeyValue(KeyValueData* pkvd)
{
if(FStrEq(pkvd->szKeyName, "desiredgamma"))
if (FStrEq(pkvd->szKeyName, "desiredgamma"))
{
this->mGammaScalar = atof(pkvd->szValue);
// Set alt value as well in case the map doesn't have one.
this->mGammaScalarAlt = atof(pkvd->szValue);
pkvd->fHandled = TRUE;
}
else if (FStrEq(pkvd->szKeyName, "desiredgammaalt"))
{
this->mGammaScalarAlt = atof(pkvd->szValue);
pkvd->fHandled = TRUE;
}
else
@ -1050,7 +1057,11 @@ float AvHGamma::GetGamma() const
{
return this->mGammaScalar;
}
// Alternative gamma for NS 3.3 lighting
float AvHGamma::GetGammaAlt() const
{
return this->mGammaScalarAlt;
}
void AvHGamma::Spawn()
{

View file

@ -344,10 +344,13 @@ public:
virtual float GetGamma() const;
virtual float GetGammaAlt() const;
virtual void Spawn();
private:
float mGammaScalar;
float mGammaScalarAlt;
};

View file

@ -2295,7 +2295,7 @@ void EV_WelderGeneralEffects(struct event_args_s* inArgs, const Vector& thePos)
cl_entity_t* thePlayer = GetEntity(theIndex);
// Don't play flashing effects if player is photosensitive
if(CVAR_GET_FLOAT(kvDynamicLights))
if(CVAR_GET_FLOAT(kvDynamicLights) >= 2.0f)
{
// Make flashing lights
int theLightIndex = 20; /* TODO: What do to about this index? */

View file

@ -324,6 +324,7 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO)
this->mTimeOfLastPlaytestUpdate = -1;
this->mTimeOfLastHandicapUpdate = -1;
this->mMapGamma = kDefaultMapGamma;
this->mMapGammaAlt = kDefaultMapGamma;
this->mCombatAttackingTeamNumber = TEAM_IND;
this->mCheats.clear();
this->mSpawnEntity = NULL;
@ -695,6 +696,7 @@ void AvHGamerules::CalculateMapGamma()
// Fetch from map extents entity if the map has one
FOR_ALL_ENTITIES(kwsGammaClassName, AvHGamma*)
this->mMapGamma = theEntity->GetGamma();
this->mMapGammaAlt = theEntity->GetGammaAlt();
END_FOR_ALL_ENTITIES(kwsGammaClassName)
this->mCalculatedMapGamma = true;
@ -1387,6 +1389,16 @@ float AvHGamerules::GetMapGamma()
return this->mMapGamma;
}
float AvHGamerules::GetMapGammaAlt()
{
if (!this->mCalculatedMapGamma)
{
this->CalculateMapGamma();
}
return this->mMapGammaAlt;
}
const AvHGameplay& AvHGamerules::GetGameplay() const
{
return this->mGameplay;
@ -3158,7 +3170,7 @@ void AvHGamerules::UpdateHLTVProxy()
}
// Resend the gammaramp
NetMsgSpec_SetGammaRamp( GetGameRules()->GetMapGamma() );
NetMsgSpec_SetGammaRamp( GetGameRules()->GetMapGamma(), GetGameRules()->GetMapGammaAlt());
HiveInfoListType theTeamHiveInfo = this->mTeamB.GetHiveInfoList();
const HiveInfoListType tmp;

View file

@ -194,6 +194,7 @@ public:
void ComputeWorldChecksum(Checksum& outChecksum) const;
float GetMapGamma();
float GetMapGammaAlt();
int GetNumCommandersOnTeam(AvHTeamNumber inTeam);
int GetNumActiveHives(AvHTeamNumber inTeam) const;
int GetNumEntities() const;
@ -399,6 +400,7 @@ private:
bool mCalculatedMapGamma;
float mMapGamma;
float mMapGammaAlt;
typedef map<int, float> EntityUnderAttackListType;
EntityUnderAttackListType mEntitiesUnderAttack;

View file

@ -1787,7 +1787,15 @@ AvHMessageID AvHHud::HotKeyHit(char inChar)
float AvHHud::GetGammaSlope() const
{
//gEngfuncs.Con_DPrintf("Map gamma set to %f\n", this->mShaderGamma);
return this->mShaderGamma;
if (CVAR_GET_FLOAT("cl_intensityalt") <= 0)
{
return this->mShaderGamma;
}
else
{
return this->mShaderGammaAlt;
}
//return sGameGammaTable.GetGammaSlope();
}
@ -1848,11 +1856,12 @@ int AvHHud::GetMaxAlienResources() const
return theMaxAlienResources;
}
bool AvHHud::SetGamma(float inSlope)
bool AvHHud::SetGamma(float inSlope, float inSlopeAlt)
{
bool theSuccess = true;
this->mShaderGamma = inSlope;
this->mShaderGammaAlt = inSlopeAlt;
//sGameGammaTable.ProcessSlope(inSlope);
@ -2603,6 +2612,7 @@ void AvHHud::ResetGame(bool inMapChanged)
this->mShaderGamma = kDefaultMapGamma;
this->mDesiredGammaSlope = kDefaultMapGamma;
this->mDesiredGammaSlopeAlt = kDefaultMapGamma;
this->mRecordingLastFrame = false;
this->mTimeOfLastHelpText = -1;
this->mDisplayedToolTipList.clear();
@ -2677,10 +2687,10 @@ void AvHHud::ResetGame(bool inMapChanged)
BIND_MESSAGE(SetGmma);
int AvHHud::MsgFunc_SetGmma(const char* pszName, int iSize, void* pbuf)
{
NetMsg_SetGammaRamp( pbuf, iSize, this->mDesiredGammaSlope );
NetMsg_SetGammaRamp( pbuf, iSize, this->mDesiredGammaSlope, this->mDesiredGammaSlopeAlt);
if (!mSteamUIActive)
{
this->SetGamma(this->mDesiredGammaSlope);
this->SetGamma(this->mDesiredGammaSlope, this->mDesiredGammaSlopeAlt);
}
return 1;
@ -3846,6 +3856,7 @@ void AvHHud::Init(void)
this->mSelectingWeaponID = -1;
this->mSelectingNodeID = MESSAGE_NULL;
this->mDesiredGammaSlope = 1;
this->mDesiredGammaSlopeAlt = 1;
this->mTimeOfLastHelpText = -1;
this->mCurrentWeaponID = -1;
this->mCurrentWeaponEnabled = false;
@ -4195,10 +4206,11 @@ int AvHHud::InitializeDemoPlayback(int inSize, unsigned char* inBuffer)
// Read in gamma
LoadData(&this->mDesiredGammaSlope, inBuffer, sizeof(this->mDesiredGammaSlope), theBytesRead);
LoadData(&this->mDesiredGammaSlopeAlt, inBuffer, sizeof(this->mDesiredGammaSlopeAlt), theBytesRead);
if (!mSteamUIActive)
{
this->SetGamma(this->mDesiredGammaSlope);
this->SetGamma(this->mDesiredGammaSlope, this->mDesiredGammaSlopeAlt);
}
// Read in resources
@ -4339,6 +4351,7 @@ void AvHHud::InitializeDemoRecording()
// Gamma, resources
int theGammaSize = sizeof(this->mDesiredGammaSlope);
int theGammaAltSize = sizeof(this->mDesiredGammaSlopeAlt);
int theResourcesSizes = sizeof(this->mResources);
// Save commander index (TODO: REMOVE)
@ -4356,7 +4369,7 @@ void AvHHud::InitializeDemoRecording()
int theSelectedSize = sizeof(int) + (int)this->mSelected.size()*sizeof(EntityInfo);
int theTotalSize = theUpgradesSize + theGammaSize + theResourcesSizes + theCommanderSize + theHiveInfoSize + theCurrentPieMenuControlSize + theSelectedSize;
int theTotalSize = theUpgradesSize + theGammaSize + theGammaAltSize + theResourcesSizes + theCommanderSize + theHiveInfoSize + theCurrentPieMenuControlSize + theSelectedSize;
// New a char array of this size
int theCounter = 0;
@ -4370,6 +4383,7 @@ void AvHHud::InitializeDemoRecording()
// Write out gamma
SaveData(theCharArray, &this->mDesiredGammaSlope, theGammaSize, theCounter);
SaveData(theCharArray, &this->mDesiredGammaSlopeAlt, theGammaAltSize, theCounter);
SaveData(theCharArray, &this->mResources, theResourcesSizes, theCounter);
SaveData(theCharArray, &theCommanderIndex, theCommanderSize, theCounter);
@ -4905,7 +4919,6 @@ cvar_t *texgamma = NULL;
cvar_t *r_detailtextures = NULL;
cvar_t *gl_max_size = NULL;
cvar_t *gl_widescreen_yfov = NULL;
cvar_t *sv_widescreenclamp = NULL;
void AvHHud::InitExploitPrevention() {
gl_monolights = gEngfuncs.pfnGetCvarPointer("gl_monolights");

View file

@ -504,7 +504,7 @@ private:
bool GetEntityInfoString(int inEntityID, string& outEntityInfoString, bool& outIsEnemy);
void ModifyAmbientSoundEntryIfChanged(bool inSoundOn, int inSoundIndex, int inEntIndex, float inTimeStarted, int inVolume, int inFadeDistance, int inFlags, Vector inOrigin);
void ResetTopDownUI();
bool SetGamma(float inSlope);
bool SetGamma(float inSlope, float inSlopeAlt);
void SetReinforcements(int inReinforcements);
void SetHelpMessage(const string& inHelpText, bool inForce = false, float inNormX = -1, float inNormY = -1);
void SetActionButtonHelpMessage(const string& inHelpText);
@ -685,6 +685,7 @@ private:
float mDesiredGammaSlope;
float mDesiredGammaSlopeAlt;
typedef vector<AvHAmbientSound> AmbientSoundListType;
AmbientSoundListType mAmbientSounds;
@ -886,6 +887,7 @@ private:
float mLastHudStyle;
float mShaderGamma;
float mShaderGammaAlt;
};

View file

@ -77,7 +77,7 @@ void Net_InitializeMessages(void)
g_msgHUDSetUpgrades = REG_USER_MSG( "SetUpgrades", 1);
g_msgProgressBar = REG_USER_MSG( "Progress", -1 );
g_msgServerVar = REG_USER_MSG( "ServerVar", -1 );
g_msgSetGammaRamp = REG_USER_MSG( "SetGmma", 1 );
g_msgSetGammaRamp = REG_USER_MSG( "SetGmma", 2 );
g_msgSetOrder = REG_USER_MSG( "SetOrder", -1 );
g_msgSetParticleTemplates = REG_USER_MSG( "Particles", -1 );
g_msgDelParts = REG_USER_MSG( "DelParts", 0);
@ -1617,24 +1617,27 @@ union float_converter
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#ifndef AVH_SERVER
void NetMsg_SetGammaRamp( void* const buffer, const int size, float& gamma )
void NetMsg_SetGammaRamp( void* const buffer, const int size, float& gamma, float& gammaAlt)
{
BEGIN_READ( buffer, size );
gamma = READ_BYTE() / 128.0f;
gammaAlt = READ_BYTE() / 128.0f;
END_READ();
}
#else
void NetMsg_SetGammaRamp( entvars_t* const pev, const float gamma )
void NetMsg_SetGammaRamp( entvars_t* const pev, const float gamma, const float gammaAlt)
{
MESSAGE_BEGIN( MSG_ONE, g_msgSetGammaRamp, NULL, pev );
WRITE_BYTE( floor( min( max(gamma, 0.0f), 1.992f) * 128.0f) );
WRITE_BYTE( floor (min( max(gammaAlt, 0.0f), 1.992f) * 128.0f) );
MESSAGE_END();
}
void NetMsgSpec_SetGammaRamp( const float gamma )
void NetMsgSpec_SetGammaRamp( const float gamma, const float gammaAlt)
{
MESSAGE_BEGIN( MSG_SPEC, g_msgSetGammaRamp );
WRITE_BYTE( floor( min( max(gamma, 0.0f), 1.992f) * 128.0f) );
WRITE_BYTE( floor( min( max(gammaAlt, 0.0f), 1.992f) * 128.0f) );
MESSAGE_END();
}
#endif

View file

@ -96,7 +96,7 @@
void NetMsg_PlayHUDNotification_Research(entvars_t* const pev, const int flags, const ResearchInfoListType& researching);
void NetMsg_ProgressBar( entvars_t* const pev, const int entity_number, const int progress, int percent=0 );
void NetMsg_ServerVar( entvars_t* const pev, const string& name, const int& value );
void NetMsg_SetGammaRamp( entvars_t* const pev, const float gamma );
void NetMsg_SetGammaRamp( entvars_t* const pev, const float gamma, const float gammaAlt);
void NetMsg_SetOrder( entvars_t* const pev, const AvHOrder& order );
void NetMsg_DelParts( entvars_t* const pev);
void NetMsg_SetParticleTemplate( entvars_t* const pev, const int index, const AvHParticleTemplate& particle_template );
@ -128,7 +128,7 @@
//SPECTATOR MESSAGE TRANSMISSION
void NetMsgSpec_TeamInfo( const int player_index, const string& team_id );
void NetMsgSpec_TextMsg( const int destination, const vector<string>& message );
void NetMsgSpec_SetGammaRamp( const float gamma );
void NetMsgSpec_SetGammaRamp( const float gamma, const float gammaAlt);
#else //!AVH_SERVER
@ -189,7 +189,7 @@
void NetMsg_ProgressBar( void* const buffer, const int size, int& entity_number, int& progress, int &percent);
//45
void NetMsg_ServerVar( void* const buffer, const int size, string& name, int& value );
void NetMsg_SetGammaRamp( void* const buffer, const int size, float& gamma );
void NetMsg_SetGammaRamp( void* const buffer, const int size, float& gamma, float& gammaAlt);
void NetMsg_SetOrder( void* const buffer, const int size, AvHOrder& order );
void NetMsg_SetParticleTemplate( void* const buffer, const int size, int &index, AvHParticleTemplate& particle_template );
void NetMsg_DelParts( void* const buffer, const int size);

View file

@ -9727,12 +9727,14 @@ void AvHPlayer::UpdateFog()
void AvHPlayer::UpdateGamma()
{
float theMapGamma = GetGameRules()->GetMapGamma();
float theMapGammaAlt = GetGameRules()->GetMapGammaAlt();
if(this->mClientGamma != theMapGamma)
{
if(!GetGameRules()->GetIsTesting())
{
NetMsg_SetGammaRamp( this->pev, theMapGamma );
NetMsg_SetGammaRamp( this->pev, theMapGamma, theMapGammaAlt);
this->mClientGamma = theMapGamma;
this->mClientGammaAlt = theMapGammaAlt;
}
}
}

View file

@ -696,6 +696,7 @@ private:
AvHMessageID mClientResearchingTech;
float mClientGamma;
float mClientGammaAlt;
StringList mSentMessageList;

View file

@ -83,11 +83,32 @@ DESCRIPTION INFO_OPTIONS
{ "0" }
}
"nsrates"
{
"Network rates (Try top to bottom until it feels stable)"
{
LIST
"[No Change]" "0"
"1: Lowest delay, but enemy stuttering likely" "1"
"2" "2"
"3" "3"
"4" "4"
"5: NS default" "5"
"6" "6"
"7" "7"
"8: HL default" "8"
"9" "9"
"10" "10"
"11: Poor connection quality" "11"
}
{ "0.000000" }
}
"cl_bob"
{
"Weapon bobbing (0.01 default)"
"Weapon bobbing (0.006 default)"
{ NUMBER 0.000000 0.010000 }
{ "1.000000" }
{ "0.006000" }
}
"cl_bobview"
@ -306,17 +327,15 @@ DESCRIPTION INFO_OPTIONS
{ "1.000000" }
}
"r_dynamic"
{
"HL Dynamic lighting (non-nvidia graphics users should turn off if you have poor performance)"
{ BOOL }
{ "1" }
}
"cl_dynamiclights"
{
"NS Dynamic lights (EPILEPSY WARNING - welder flickering, bright lights from items spawning)"
{ BOOL }
"Dynamic lights"
{
LIST
"Off" "0"
"On" "1"
"On + Welder flashing (EPILEPSY WARNING)" "2"
}
{ "0" }
}

View file

@ -1,2 +0,0 @@
// Enter commands to be executed before swapping to any weapon. Useful for resetting commands that are adjusted in only a small number of weapon configs.
// Commands in other weapon configs are executed after this file and take precedence over these commands.

View file

@ -0,0 +1,4 @@
// Enter commands to be executed when swapping to this weapon. Useful for per-weapon cl_cross commands or sensitivity.
cl_cross_size "0"
cl_cross_dot_size "0"
cl_cross_circle_radius "0"

View file

@ -23,4 +23,3 @@ cl_cross_outline_alpha "128"
cl_cross_outline_inner "0"
cl_cross_size "50"
cl_cross_thickness "2.000000"
cl_customcrosshair "0"

View file

@ -12,4 +12,4 @@ cl_cross_outline "0.75"
cl_cross_outline_alpha "255"
cl_cross_outline_inner "0"
cl_cross_size "4.000000"
cl_cross_thickness "2.000000"
cl_cross_thickness "2.000000"

View file

@ -1,11 +1,11 @@
// Enter commands to be executed when swapping to this weapon. Useful for per-weapon cl_cross commands or sensitivity.
cl_cross_alpha "255.000000"
cl_cross_circle_alpha "170"
cl_cross_circle_alpha "220"
cl_cross_circle_color ""
cl_cross_circle_outline "1"
cl_cross_circle_outline_alpha "64"
cl_cross_circle_outline_inner "0"
cl_cross_circle_radius "55"
cl_cross_circle_radius "50"
cl_cross_circle_thickness "1.5"
cl_cross_color "0 190 255"
cl_cross_dot_alpha "255"

View file

@ -1 +1,15 @@
// Enter commands to be executed when swapping to this weapon. Useful for per-weapon cl_cross commands or sensitivity.
cl_cross_alpha "255.000000"
cl_cross_circle_radius "0.000000"
cl_cross_color "255 160 0"
cl_cross_dot_size "0.000000"
cl_cross_gap "4.000000"
cl_cross_line_bottom "1"
cl_cross_line_left "1"
cl_cross_line_right "1"
cl_cross_line_top "1"
cl_cross_outline "0.75"
cl_cross_outline_alpha "255"
cl_cross_outline_inner "0"
cl_cross_size "5.000000"
cl_cross_thickness "2.000000"