diff --git a/reaction/cgame/cg_local.h b/reaction/cgame/cg_local.h index 15c82cac..615c8c76 100644 --- a/reaction/cgame/cg_local.h +++ b/reaction/cgame/cg_local.h @@ -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; diff --git a/reaction/cgame/cg_main.c b/reaction/cgame/cg_main.c index 3342c694..79e63542 100644 --- a/reaction/cgame/cg_main.c +++ b/reaction/cgame/cg_main.c @@ -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"); } /* diff --git a/reaction/cgame/cg_servercmds.c b/reaction/cgame/cg_servercmds.c index 13221910..669a3c5f 100644 --- a/reaction/cgame/cg_servercmds.c +++ b/reaction/cgame/cg_servercmds.c @@ -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) { diff --git a/reaction/game/bg_public.h b/reaction/game/bg_public.h index 2f168219..824f6796 100644 --- a/reaction/game/bg_public.h +++ b/reaction/game/bg_public.h @@ -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 { diff --git a/reaction/game/g_client.c b/reaction/game/g_client.c index 202f0934..925e49d7 100644 --- a/reaction/game/g_client.c +++ b/reaction/game/g_client.c @@ -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"; - } }