Improved and fixed the Anti-Cheat System

This commit is contained in:
Daniel Simoes 2002-06-12 15:30:24 +00:00
parent e96b06d8f2
commit 00b3604ecb
5 changed files with 55 additions and 8 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.91 2002/06/12 15:30:24 slicer
// Improved and fixed the Anti-Cheat System
//
// Revision 1.90 2002/06/11 22:49:42 niceass
// HC brass
//
@ -1664,6 +1667,8 @@ extern vmCvar_t cg_RQ3_crosshairColorB;
extern vmCvar_t cg_RQ3_crosshairColorA;
// JBravo: cvar for tkok popups
extern vmCvar_t cg_RQ3_tkokAutoPopup;
// Slicer: for the Anti-Cheat System
extern vmCvar_t cg_RQ3_Auth;
//Elder: SSG unique sensitivities
extern vmCvar_t cg_RQ3_ssgSensitivityAuto;
extern vmCvar_t cg_RQ3_ssgSensitivity2x;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.81 2002/06/12 15:30:24 slicer
// Improved and fixed the Anti-Cheat System
//
// Revision 1.80 2002/06/11 22:49:22 niceass
// HC brass
//
@ -318,6 +321,8 @@ vmCvar_t cg_RQ3_crosshairColorB;
vmCvar_t cg_RQ3_crosshairColorA;
// JBravo: cvar for tkok popup
vmCvar_t cg_RQ3_tkokAutoPopup;
// Slicer: for the Anti-Cheat System
vmCvar_t cg_RQ3_Auth;
//Elder: SSG unique sensitivities
vmCvar_t cg_RQ3_ssgSensitivityAuto;
vmCvar_t cg_RQ3_ssgSensitivity2x;
@ -523,6 +528,8 @@ static cvarTable_t cvarTable[] = { // bk001129
// Elder: removed
//{ &cg_RQ3_drawWeapon, "cg_RQ3_drawWeapon", "2", CVAR_ARCHIVE },
{ &cg_RQ3_glasstime, "cg_RQ3_glasstime", "0", CVAR_ARCHIVE },
// Slicer: for the Anti-Cheat System
{ &cg_RQ3_Auth, "cg_RQ3_Auth", "0", CVAR_USERINFO | CVAR_ROM },
// Elder: added
{ &cg_RQ3_flash, "cg_RQ3_flash", "1", CVAR_ARCHIVE },
// NiceAss: added
@ -2612,6 +2619,9 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
CG_ShaderStateChanged();
trap_S_ClearLoopingSounds( qtrue );
//Slicer: For the anti-cheat system
trap_Cvar_Set("cg_RQ3_Auth","0");
}
/*

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.49 2002/06/12 15:30:24 slicer
// Improved and fixed the Anti-Cheat System
//
// Revision 1.48 2002/06/10 20:56:38 niceass
// scoreboard fix
//
@ -1276,6 +1279,9 @@ void CG_RQ3_Cmd () {
/*case SETTEAMPLAYERS:
CG_SetTeamPlayers();
break;*/
//Slicer: for the anti-cheat system
case AUTH:
trap_Cvar_Set("cg_RQ3_auth","1");
case SELECTPISTOL:
if (cg.snap) {
switch (cg.snap->ps.weapon) {

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.77 2002/06/12 15:29:53 slicer
// Improved and fixed the Anti-Cheat System
//
// Revision 1.76 2002/06/10 14:03:47 slicer
// Removed rq3_cmd : ROUND
//
@ -297,7 +300,7 @@ enum {
LIGHTS,
CAMERA,
ACTION,
SETTEAMPLAYERS,
//SETTEAMPLAYERS,
SELECTPISTOL,
//Slicer: apparently not being used
// ROUND,
@ -309,7 +312,8 @@ enum {
RADIO,
STARTDEMO,
STOPDEMO,
SCREENSHOT
SCREENSHOT,
AUTH
};
//Elder: sound events for EV_RQ3_SOUND
typedef enum {

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.90 2002/06/12 15:29:53 slicer
// Improved and fixed the Anti-Cheat System
//
// Revision 1.89 2002/06/12 03:37:38 blaze
// some fixes for the add bot code
//
@ -1102,6 +1105,31 @@ void ClientUserinfoChanged( int clientNum ) {
team = client->sess.sessionTeam;
}
//Slicer: for the anti-cheat system
s = Info_ValueForKey( userinfo, "cg_RQ3_auth" );
if(!atoi(s)) {
//Blaze: Send cheat cvars to client
if (!G_SendCheatVars(clientNum))
{
Com_Printf("Error loading cvar cfg\n");
//return "Error_loading_cvar_cfg";
}
else {
// This didn't really worked...
/* G_Printf("Sending changed userinfo\n");
Info_SetValueForKey( userinfo, "cg_RQ3_auth", "1" );
// register the userinfo
trap_SetUserinfo( clientNum, userinfo );*/
trap_SendServerCommand( clientNum, va("rq3_cmd %i",AUTH));
}
}
/* NOTE: all client side now
// team
@ -1488,12 +1516,6 @@ void ClientBegin(int clientNum) {
}
i = RQ3TeamCount( -1, client->sess.sessionTeam);
}
//Blaze: Send cheat cvars to client
if (!G_SendCheatVars(clientNum))
{
Com_Printf("Error loading cvar cfg\n");
//return "Error_loading_cvar_cfg";
}
}