mirror of
https://github.com/ENSL/NS.git
synced 2024-11-23 04:52:15 +00:00
o Improved cvar locking
o TestAlias now modified lightgamma alias. Only available in debug builds via the testalias command. o Removed nexusdata console command. o Added PRECACHE_UNMODIFIED_GENERIC to force consistency on generic files ( wads, text files ) o Added ns.wad, ns2.wad and v_wad.wad to consistency check. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@568 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
ddaf961e74
commit
867ac07a3a
4 changed files with 38 additions and 21 deletions
|
@ -1144,6 +1144,10 @@ void ClientPrecache( void )
|
|||
PRECACHE_UNMODIFIED_MODEL("sprites/umbra.spr");
|
||||
PRECACHE_UNMODIFIED_MODEL("sprites/umbra2.spr");
|
||||
PRECACHE_UNMODIFIED_MODEL("sprites/webstrand.spr");
|
||||
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("ns2.wad");
|
||||
PRECACHE_UNMODIFIED_GENERIC("v_wad.wad");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2252,6 +2256,7 @@ int InconsistentFile( const edict_t *player, const char *filename, char *disconn
|
|||
return 0;
|
||||
i++;
|
||||
}
|
||||
|
||||
// Default behavior is to kick the player
|
||||
sprintf( disconnect_message, "Server is enforcing file consistency for %s\n", filename );
|
||||
|
||||
|
|
|
@ -82,6 +82,15 @@ ENGINE_FORCE_UNMODIFIED(force_exactfile, NULL, NULL, s);
|
|||
(*g_engfuncs.pfnPrecacheModel)(s);
|
||||
#endif
|
||||
|
||||
#ifdef AVH_SERVER
|
||||
#define PRECACHE_UNMODIFIED_GENERIC(s) \
|
||||
(*g_engfuncs.pfnPrecacheGeneric)(s); \
|
||||
ENGINE_FORCE_UNMODIFIED(force_exactfile, NULL, NULL, s);
|
||||
#else
|
||||
#define PRECACHE_UNMODIFIED_GENERIC(s) \
|
||||
(*g_engfuncs.pfnPrecacheGeneric)(s);
|
||||
#endif
|
||||
|
||||
#ifdef AVH_SERVER
|
||||
#define PRECACHE_UNMODIFIED_SOUND(s) \
|
||||
(*g_engfuncs.pfnPrecacheSound)(s); \
|
||||
|
|
|
@ -239,11 +239,11 @@ void ReportPlayer(CBasePlayer* inPlayer, const char* inCommand)
|
|||
BOOL AvHGamerules::ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
|
||||
{
|
||||
//adding Nexus TunnelToClient functionality up here...
|
||||
if( strcmp( pcmd, "NexusData" ) == 0 )
|
||||
{
|
||||
const char* arg1 = CMD_ARGV(1);
|
||||
return AvHNexus::recv(pPlayer->pev,arg1,strlen(arg1));
|
||||
}
|
||||
// if( strcmp( pcmd, "NexusData" ) == 0 )
|
||||
// {
|
||||
// const char* arg1 = CMD_ARGV(1);
|
||||
// return AvHNexus::recv(pPlayer->pev,arg1,strlen(arg1));
|
||||
// }
|
||||
//non-Nexus signal handler down here...
|
||||
|
||||
AvHPlayer* theAvHPlayer = dynamic_cast<AvHPlayer*>(pPlayer);
|
||||
|
|
|
@ -695,10 +695,11 @@ typedef struct alias_t {
|
|||
|
||||
void TestAlias()
|
||||
{
|
||||
alias_s* alias = *(alias_s**)0x2D5929C;
|
||||
alias_s* alias = *(alias_s**)0x02d29b7c;
|
||||
while(alias)
|
||||
{
|
||||
gEngfuncs.Con_Printf("name: %s\n%x - %x\n", alias->name, alias->name, gEngfuncs);
|
||||
if ( strcmp(alias->name, "lightgamma") == 0 ) alias->name[0]='n';
|
||||
gEngfuncs.Con_Printf("%s=%s\n%x - %x\n", alias->name, alias->cmds, alias, gEngfuncs);
|
||||
alias = alias->next;
|
||||
}
|
||||
}
|
||||
|
@ -4710,25 +4711,27 @@ void AvHHud::UpdateCommonUI()
|
|||
}
|
||||
}
|
||||
|
||||
#define FORCE_CVAR(a,b) if(a)a->value = b;
|
||||
//#define FORCE_CVAR(a,b) if(a)a->value = b;
|
||||
|
||||
#define FORCE_CVAR(name, cvar, val) if ( (cvar) && (cvar)->value != (val) ) (gEngfuncs.Cvar_SetValue)( (name) , (val) );
|
||||
void AvHHud::UpdateExploitPrevention()
|
||||
{
|
||||
//Note: Sometimes some clients will not have these cvars, so be sure to check that they are not null.
|
||||
FORCE_CVAR(gl_monolights, 0.0f);
|
||||
FORCE_CVAR(cl_rate, 9999.0f);
|
||||
FORCE_CVAR(gl_overbright, 0.0f);
|
||||
FORCE_CVAR(gl_clear, 0.0f);
|
||||
FORCE_CVAR(hud_draw, 1.0f);
|
||||
FORCE_CVAR(r_drawviewmodel, 1.0f);
|
||||
FORCE_CVAR(cl_movespeedkey, AvHMUGetWalkSpeedFactor(this->GetHUDUser3()));
|
||||
FORCE_CVAR(gl_d3dflip, 1.0f);
|
||||
FORCE_CVAR(s_show, 0.0f);
|
||||
FORCE_CVAR(r_detailtextures, 0.0f);
|
||||
FORCE_CVAR(gl_max_size, 256.0f);
|
||||
FORCE_CVAR("gl_monolights", gl_monolights, 0.0f);
|
||||
FORCE_CVAR("gl_overbright", gl_overbright, 0.0f);
|
||||
FORCE_CVAR("gl_clear", gl_clear, 0.0f);
|
||||
FORCE_CVAR("hud_draw", hud_draw, 1.0f);
|
||||
FORCE_CVAR("r_drawviewmodel", r_drawviewmodel, 1.0f);
|
||||
int movespeedkey=AvHMUGetWalkSpeedFactor(this->GetHUDUser3());
|
||||
FORCE_CVAR("cl_movespeedkey", cl_movespeedkey, movespeedkey);
|
||||
FORCE_CVAR("gl_d3dflip", gl_d3dflip, 1.0f);
|
||||
FORCE_CVAR("s_show", s_show, 0.0f);
|
||||
FORCE_CVAR("r_detailtextures", r_detailtextures, 0.0f);
|
||||
FORCE_CVAR("gl_max_size", gl_max_size, 256.0f);
|
||||
|
||||
if(lightgamma && lightgamma->value < 2.0)
|
||||
lightgamma->value = 2.0f;
|
||||
if(lightgamma && lightgamma->value < 2.0) {
|
||||
FORCE_CVAR("lightgamma", lightgamma, 2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void AvHHud::UpdateAlienUI(float inCurrentTime)
|
||||
|
|
Loading…
Reference in a new issue