mirror of
https://github.com/ENSL/NS.git
synced 2024-11-22 20:51:35 +00:00
Merge pull request #69 from ENSL/pierow-changes
Changes/fixes to r_dynamic, cl_ambientsound, skulk walk speed, -attack
This commit is contained in:
commit
2fb18b989f
5 changed files with 20 additions and 57 deletions
|
@ -135,6 +135,7 @@ cvar_t *cl_highdetail;
|
||||||
cvar_t *cl_cmhotkeys;
|
cvar_t *cl_cmhotkeys;
|
||||||
cvar_t *cl_forcedefaultfov;
|
cvar_t *cl_forcedefaultfov;
|
||||||
cvar_t *cl_dynamiclights;
|
cvar_t *cl_dynamiclights;
|
||||||
|
cvar_t *r_dynamic;
|
||||||
cvar_t *cl_buildmessages;
|
cvar_t *cl_buildmessages;
|
||||||
cvar_t *cl_particleinfo;
|
cvar_t *cl_particleinfo;
|
||||||
cvar_t *cl_widescreen;
|
cvar_t *cl_widescreen;
|
||||||
|
@ -779,7 +780,7 @@ void IN_AttackUp(void)
|
||||||
{
|
{
|
||||||
KeyUp( &in_attack );
|
KeyUp( &in_attack );
|
||||||
in_cancel = 0;
|
in_cancel = 0;
|
||||||
IN_Attack2Up();
|
//IN_Attack2Up();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IN_AttackDownForced(void)
|
void IN_AttackDownForced(void)
|
||||||
|
@ -1550,7 +1551,7 @@ void InitInput (void)
|
||||||
cl_forcedefaultfov = gEngfuncs.pfnRegisterVariable ( kvForceDefaultFOV, "0", FCVAR_ARCHIVE );
|
cl_forcedefaultfov = gEngfuncs.pfnRegisterVariable ( kvForceDefaultFOV, "0", FCVAR_ARCHIVE );
|
||||||
cl_particleinfo = gEngfuncs.pfnRegisterVariable ( kvParticleInfo, "0", FCVAR_ARCHIVE );
|
cl_particleinfo = gEngfuncs.pfnRegisterVariable ( kvParticleInfo, "0", FCVAR_ARCHIVE );
|
||||||
cl_widescreen = gEngfuncs.pfnRegisterVariable ( kvWidescreen, "1", FCVAR_ARCHIVE );
|
cl_widescreen = gEngfuncs.pfnRegisterVariable ( kvWidescreen, "1", FCVAR_ARCHIVE );
|
||||||
cl_ambientsound = gEngfuncs.pfnRegisterVariable ( kvAmbientSound, "2", FCVAR_ARCHIVE);
|
cl_ambientsound = gEngfuncs.pfnRegisterVariable ( kvAmbientSound, "0", FCVAR_ARCHIVE);
|
||||||
senslock = gEngfuncs.pfnRegisterVariable ("senslock", "0", FCVAR_ARCHIVE);
|
senslock = gEngfuncs.pfnRegisterVariable ("senslock", "0", FCVAR_ARCHIVE);
|
||||||
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
|
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
|
||||||
cl_chatbeep = gEngfuncs.pfnRegisterVariable ("cl_chatbeep", "1", FCVAR_ARCHIVE);
|
cl_chatbeep = gEngfuncs.pfnRegisterVariable ("cl_chatbeep", "1", FCVAR_ARCHIVE);
|
||||||
|
|
|
@ -239,18 +239,9 @@ void CAmbientGeneric :: Precache( void )
|
||||||
m_fActive = TRUE;
|
m_fActive = TRUE;
|
||||||
}
|
}
|
||||||
if ( m_fActive )
|
if ( m_fActive )
|
||||||
{
|
|
||||||
|
|
||||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
|
||||||
{
|
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
|
||||||
0, m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
|
|
||||||
}
|
|
||||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
|
||||||
{
|
{
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||||
(m_dpv.vol * 0.01), m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
|
(m_dpv.vol * 0.01), m_flAttenuation, SND_SPAWNING, m_dpv.pitch);
|
||||||
}
|
|
||||||
|
|
||||||
pev->nextthink = gpGlobals->time + 0.1;
|
pev->nextthink = gpGlobals->time + 0.1;
|
||||||
}
|
}
|
||||||
|
@ -442,20 +433,10 @@ void CAmbientGeneric :: RampThink( void )
|
||||||
if (pitch == PITCH_NORM)
|
if (pitch == PITCH_NORM)
|
||||||
pitch = PITCH_NORM + 1; // don't send 'no pitch' !
|
pitch = PITCH_NORM + 1; // don't send 'no pitch' !
|
||||||
|
|
||||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") == 0.0f;
|
|
||||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
|
||||||
{
|
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
|
||||||
0, m_flAttenuation, flags, pitch);
|
|
||||||
}
|
|
||||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
|
||||||
{
|
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||||
(vol * 0.01), m_flAttenuation, flags, pitch);
|
(vol * 0.01), m_flAttenuation, flags, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// update ramps at 5hz
|
// update ramps at 5hz
|
||||||
pev->nextthink = gpGlobals->time + 0.2;
|
pev->nextthink = gpGlobals->time + 0.2;
|
||||||
return;
|
return;
|
||||||
|
@ -650,17 +631,8 @@ void CAmbientGeneric :: ToggleUse ( CBaseEntity *pActivator, CBaseEntity *pCalle
|
||||||
|
|
||||||
InitModulationParms();
|
InitModulationParms();
|
||||||
|
|
||||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") == 0.0f;
|
|
||||||
if (CVAR_GET_FLOAT("cl_ambientsound") == 0.0f)
|
|
||||||
{
|
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
|
||||||
0, m_flAttenuation, 0, m_dpv.pitch);
|
|
||||||
}
|
|
||||||
else if (CVAR_GET_FLOAT("cl_ambientsound") == 2.0f)
|
|
||||||
{
|
|
||||||
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
UTIL_EmitAmbientSound(ENT(pev), pev->origin, szSoundFile,
|
||||||
(m_dpv.vol * 0.01), m_flAttenuation, 0, m_dpv.pitch);
|
(m_dpv.vol * 0.01), m_flAttenuation, 0, m_dpv.pitch);
|
||||||
}
|
|
||||||
|
|
||||||
pev->nextthink = gpGlobals->time + 0.1;
|
pev->nextthink = gpGlobals->time + 0.1;
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,14 @@ void AvHAmbientSound::UpdateVolume(const Vector& inListenerPosition)
|
||||||
theVolume = this->mVolume - this->mVolume*(theDistance/(float)this->mFadeDistance);
|
theVolume = this->mVolume - this->mVolume*(theDistance/(float)this->mFadeDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CVAR_GET_FLOAT("cl_ambientsound") != 1.0f)
|
||||||
|
{
|
||||||
|
theVolume = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
theVolume = min(max(0, theVolume), 255);
|
theVolume = min(max(0, theVolume), 255);
|
||||||
|
}
|
||||||
|
|
||||||
FMOD_INSTANCE* theFMOD = gHUD.GetFMOD();
|
FMOD_INSTANCE* theFMOD = gHUD.GetFMOD();
|
||||||
|
|
||||||
|
|
|
@ -687,15 +687,7 @@ void AvHNoBuild::Spawn()
|
||||||
AvHMP3Audio::AvHMP3Audio()
|
AvHMP3Audio::AvHMP3Audio()
|
||||||
{
|
{
|
||||||
this->mUseState = false;
|
this->mUseState = false;
|
||||||
//bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") != 1;
|
|
||||||
//if (ambtoggle)
|
|
||||||
//{
|
|
||||||
// this->mSoundVolume = 0;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
this->mSoundVolume = 255;
|
this->mSoundVolume = 255;
|
||||||
// }
|
|
||||||
this->mLooping = false;
|
this->mLooping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,17 +704,8 @@ void AvHMP3Audio::KeyValue( KeyValueData* pkvd )
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else if(FStrEq(pkvd->szKeyName, "soundvolume"))
|
else if(FStrEq(pkvd->szKeyName, "soundvolume"))
|
||||||
{
|
|
||||||
bool ambtoggle = CVAR_GET_FLOAT("cl_ambientsound") != 1;
|
|
||||||
if (ambtoggle)
|
|
||||||
{
|
|
||||||
this->mSoundVolume = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
this->mSoundVolume = atoi(pkvd->szValue);
|
this->mSoundVolume = atoi(pkvd->szValue);
|
||||||
}
|
|
||||||
|
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else if(FStrEq(pkvd->szKeyName, "fadedistance"))
|
else if(FStrEq(pkvd->szKeyName, "fadedistance"))
|
||||||
|
|
|
@ -270,7 +270,7 @@ float AvHMUGetWalkSpeedFactor(AvHUser3 inUser3)
|
||||||
case AVH_USER3_ALIEN_PLAYER1:
|
case AVH_USER3_ALIEN_PLAYER1:
|
||||||
//theMoveSpeed = .04f;
|
//theMoveSpeed = .04f;
|
||||||
//theMoveSpeed = .14f;
|
//theMoveSpeed = .14f;
|
||||||
theMoveSpeed = .25f;
|
theMoveSpeed = .35f;
|
||||||
break;
|
break;
|
||||||
case AVH_USER3_ALIEN_PLAYER2:
|
case AVH_USER3_ALIEN_PLAYER2:
|
||||||
//theMoveSpeed = .08f;
|
//theMoveSpeed = .08f;
|
||||||
|
|
Loading…
Reference in a new issue