Xrasher Improvements
Some checks are pending
Build & Deploy Engine / build (macos-13, amd64, apple) (push) Waiting to run
Build & Deploy Engine / build (macos-14, arm64, apple) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, arm64, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, armhf, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, ppc64el, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, riscv64, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, amd64, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, i386, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, multiarch, android) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-latest, arm64, nswitch) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-latest, armv7hf, psvita) (push) Waiting to run
Build & Deploy Engine / build (windows-2019, i386, win32) (push) Waiting to run
Build & Deploy Engine / build (windows-latest, amd64, win32) (push) Waiting to run
Build & Deploy Engine / flatpak (su.xash.Engine.Compat.i386) (push) Waiting to run
Build & Deploy Engine / Upload releases (push) Blocked by required conditions
Some checks are pending
Build & Deploy Engine / build (macos-13, amd64, apple) (push) Waiting to run
Build & Deploy Engine / build (macos-14, arm64, apple) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, arm64, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, armhf, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, ppc64el, linux) (push) Waiting to run
Build & Deploy Engine / build (true, ubuntu-20.04, riscv64, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, amd64, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, i386, linux) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-20.04, multiarch, android) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-latest, arm64, nswitch) (push) Waiting to run
Build & Deploy Engine / build (ubuntu-latest, armv7hf, psvita) (push) Waiting to run
Build & Deploy Engine / build (windows-2019, i386, win32) (push) Waiting to run
Build & Deploy Engine / build (windows-latest, amd64, win32) (push) Waiting to run
Build & Deploy Engine / flatpak (su.xash.Engine.Compat.i386) (push) Waiting to run
Build & Deploy Engine / Upload releases (push) Blocked by required conditions
This commit is contained in:
parent
ecd2d9632b
commit
f03c8a4f1e
6 changed files with 84 additions and 93 deletions
|
@ -48,7 +48,7 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"eternal_hope",
|
||||
"BlessedDefender",
|
||||
"trinityChampion",
|
||||
"peacefuldisciple"
|
||||
"peacefuldisciple",
|
||||
"FerventPrayer",
|
||||
"cobson",
|
||||
"feraljak",
|
||||
|
@ -161,7 +161,7 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"shots at bazaar",
|
||||
"kang",
|
||||
"ShadowMen",
|
||||
"TheyEatMyFlesh"
|
||||
"TheyEatMyFlesh",
|
||||
"Gangstalker",
|
||||
"Gasdrip",
|
||||
"hl2beta",
|
||||
|
@ -188,7 +188,7 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"5uckless",
|
||||
"http://suckless.org",
|
||||
"http://libgen.st",
|
||||
"PublicDomanCC0Forever"
|
||||
"PublicDomanCC0Forever",
|
||||
"C+HolyC+ZealC+Assembly",
|
||||
"x86-64",
|
||||
"aarch64",
|
||||
|
@ -235,7 +235,7 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"unnamed",
|
||||
"a_blank_name",
|
||||
"missing_name",
|
||||
"empty_name"
|
||||
"empty_name",
|
||||
"null_name",
|
||||
"null",
|
||||
"NULL",
|
||||
|
@ -272,15 +272,15 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"You'reHacking",
|
||||
"''''''''''''",
|
||||
")))))))))))))",
|
||||
"((((((((((((("
|
||||
"{{{{{{{{{{{{{"
|
||||
"(((((((((((((",
|
||||
"{{{{{{{{{{{{{",
|
||||
"}}}}}}}}}}}}}",
|
||||
"=============",
|
||||
"sssssssssssssss",
|
||||
"wwwwwwwwwwwwwwww",
|
||||
"vvvvvvvvvvvvvvvv",
|
||||
"zzzzzzzzzzzzzzzz",
|
||||
"ZZZZZZZZZZZZZZZZ"
|
||||
"ZZZZZZZZZZZZZZZZ",
|
||||
"BubGames",
|
||||
"bub_games",
|
||||
"RealBubGames",
|
||||
|
@ -298,20 +298,6 @@ const char* xrasher_names[XRASHER_NAMES] = {
|
|||
"essen",
|
||||
};
|
||||
|
||||
/*********************************************
|
||||
* Description - Xrasher Aim Assist
|
||||
* *******************************************/
|
||||
void CL_AimAssist_f(void);
|
||||
void CL_AimAssist_f(void) {
|
||||
Con_Printf("Xrasher aimbot activated...\n");
|
||||
if(xrasher_aimnear.value == 1){
|
||||
xrasher_aimnear.value = 0;
|
||||
}
|
||||
else{
|
||||
xrasher_aimnear.value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* Description - Xrasher picking a random name to help blend in
|
||||
* *******************************************/
|
||||
|
@ -380,7 +366,8 @@ CVAR_DEFINE_AUTO( cl_fixmodelinterpolationartifacts, "1", 0, "try to fix up mode
|
|||
|
||||
//Xrasher
|
||||
CVAR_DEFINE_AUTO( xrasher_aimnear, "0", 0, "Enable Xrasher's Aimbot, based on raw distance" );
|
||||
CVAR_DEFINE_AUTO( xrasher_aimsmart, "1", 0, "Enable Xrasher's Smarter Aimbot" );
|
||||
CVAR_DEFINE_AUTO( xrasher_aim, "1", 0, "Enable Xrasher's Smart and Silent Aimbot" );
|
||||
CVAR_DEFINE_AUTO( xrasher_maxdist, "30", 0, "Xrasher Aimbot's maximum angular distance, ie: don't do 180s." );
|
||||
|
||||
//
|
||||
// userinfo
|
||||
|
@ -1393,8 +1380,10 @@ static void CL_SendConnectPacket( connprotocol_t proto, int challenge )
|
|||
Info_RemoveKey( cls.userinfo, "cl_maxpayload" );
|
||||
|
||||
name = Info_ValueForKey( cls.userinfo, "name" );
|
||||
if( Q_strnicmp( name, "[Xash3D]", 8 ))
|
||||
Info_SetValueForKeyf( cls.userinfo, "name", sizeof( cls.userinfo ), "[Xash3D]%s", name );
|
||||
|
||||
// Make Xrasher users more anonymous in foreign servers
|
||||
// if( Q_strnicmp( name, "[Xash3D]", 8 ))
|
||||
// Info_SetValueForKeyf( cls.userinfo, "name", sizeof( cls.userinfo ), "[Xash3D]%s", name );
|
||||
|
||||
MSG_Init( &send, "GoldSrcConnect", send_buf, sizeof( send_buf ));
|
||||
MSG_WriteLong( &send, NET_HEADER_OUTOFBANDPACKET );
|
||||
|
@ -3803,9 +3792,9 @@ static void CL_InitLocal( void )
|
|||
|
||||
Cmd_AddCommand( "cl_list_messages", CL_ListMessages_f, "list registered user messages" );
|
||||
|
||||
//Xrasher aim assist
|
||||
Cvar_RegisterVariable( &xrasher_aimnear );
|
||||
Cvar_RegisterVariable( &xrasher_aimsmart );
|
||||
//Xrasher new cvars and commands
|
||||
Cvar_RegisterVariable( &xrasher_aim );
|
||||
Cvar_RegisterVariable( &xrasher_maxdist );
|
||||
Cmd_AddCommand( "xrasher_newname", CL_XrasherNewName, "Pick a new random name." );
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ GNU General Public License for more details.
|
|||
#include "common.h"
|
||||
#include "client.h"
|
||||
#include "kbutton.h"
|
||||
#include "xash3d_types.h"
|
||||
|
||||
#if XASH_LOW_MEMORY == 0
|
||||
#define NET_TIMINGS 1024
|
||||
|
@ -678,23 +679,21 @@ void SCR_DrawNetGraph( void )
|
|||
|
||||
|
||||
//Xrasher Draw Hud
|
||||
#define XRASHERUI_X 720
|
||||
#define XRASHERUI_X 10
|
||||
#define XRASHERUI_Y 800
|
||||
font = Con_GetFont( 0 );
|
||||
CL_DrawString(10, 800, "Xrasher Super-Client by Vilyaem", xrashcolours, font, FONT_DRAW_NORENDERMODE);
|
||||
if(xrasher_aimnear.value){
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Near ACTIVE");
|
||||
|
||||
if(xrasher_aim.value){
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim ACTIVE");
|
||||
}
|
||||
else{
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Near INACTIVE");
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim INACTIVE");
|
||||
}
|
||||
|
||||
if(xrasher_aimsmart.value){
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Angular ACTIVE");
|
||||
}
|
||||
else{
|
||||
CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Angular INACTIVE");
|
||||
}
|
||||
//CL_DrawString(1024/2,567/2,".",xrashcolours,font,FONT_DRAW_NORENDERMODE);
|
||||
|
||||
|
||||
|
||||
if( graphtype < 3 )
|
||||
{
|
||||
|
|
|
@ -706,8 +706,8 @@ extern convar_t ui_renderworld;
|
|||
extern convar_t cl_fixmodelinterpolationartifacts;
|
||||
|
||||
//Xrasher
|
||||
extern convar_t xrasher_aimnear;
|
||||
extern convar_t xrasher_aimsmart;
|
||||
extern convar_t xrasher_aim;
|
||||
extern convar_t xrasher_maxdist;
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
|
|
@ -810,6 +810,9 @@ void Con_Init( void )
|
|||
con.initialized = true;
|
||||
|
||||
Con_Printf( "Console initialized.\n" );
|
||||
|
||||
// :)
|
||||
Con_Printf("Enjoy Xrasher!!!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,6 +16,10 @@ GNU General Public License for more details.
|
|||
#include "common.h"
|
||||
#include "input.h"
|
||||
#include "client.h"
|
||||
#include "const.h"
|
||||
#include "pm_local.h"
|
||||
#include "protocol.h"
|
||||
#include "system.h"
|
||||
#include "vgui_draw.h"
|
||||
#include "cursor_type.h"
|
||||
|
||||
|
@ -563,60 +567,36 @@ static void IN_CollectInput( float *forward, float *side, float *pitch, float *y
|
|||
}
|
||||
|
||||
/*********************************************
|
||||
* Description - Xrasher Aim Assist
|
||||
* Apply aim assist to a user command, this is based on nearest player
|
||||
* Description - Xrasher Aim Assist Prototypes and Functions
|
||||
* Author - Vilyaem
|
||||
* *******************************************/
|
||||
void CL_XrasherAimAssistNear(usercmd_t* cmd);
|
||||
void CL_XrasherAimAssistSmart(usercmd_t* cmd);
|
||||
void CL_XrasherAimAssistNear(usercmd_t* cmd) {
|
||||
float distance;
|
||||
void CL_XrasherAim(usercmd_t* cmd);
|
||||
|
||||
void CL_XrasherAim(usercmd_t *cmd){
|
||||
cl_entity_t *localPlayer = CL_GetLocalPlayer();
|
||||
cl_entity_t *nearestTarget = NULL;
|
||||
float minDistance = 9999999.0f;
|
||||
|
||||
if (!localPlayer || !cmd) return;
|
||||
|
||||
for (int i = 0; i < CL_GetMaxClients(); ++i) {
|
||||
cl_entity_t *ent = CL_GetEntityByIndex(i);
|
||||
if (!ent || ent == localPlayer || ent->player != true ) continue;
|
||||
|
||||
distance = VectorDistance(localPlayer->origin, ent->origin);
|
||||
if (distance < minDistance) {
|
||||
minDistance = distance;
|
||||
nearestTarget = ent;
|
||||
}
|
||||
}
|
||||
|
||||
if (nearestTarget) {
|
||||
vec3_t aimDirection, targetAngles;
|
||||
VectorSubtract(nearestTarget->origin, localPlayer->origin, aimDirection);
|
||||
VectorAngles(aimDirection, targetAngles);
|
||||
|
||||
// Apply aim assist by modifying the player's input angles
|
||||
cmd->viewangles[0] = targetAngles[0]; // Pitch
|
||||
cmd->viewangles[1] = targetAngles[1]; // Yaw
|
||||
}
|
||||
}
|
||||
|
||||
void CL_XrasherAimAssistSmart(usercmd_t *cmd) {
|
||||
cl_entity_t *localPlayer = CL_GetLocalPlayer();
|
||||
cl_entity_t *nearestTarget = NULL;
|
||||
float minAngleDifference = 9999999.0f;
|
||||
float minAngleDifference = xrasher_maxdist.value;
|
||||
vec3_t currentAngles = { cmd->viewangles[0], cmd->viewangles[1], 0 };
|
||||
vec3_t aimDirection, targetAngles;
|
||||
float angleDifference;
|
||||
|
||||
// New Experimental Junk
|
||||
//entity_state_t *playerstate;
|
||||
//frame_t *frame;
|
||||
//frame = &cl.frames[cl.parsecountmod];
|
||||
|
||||
for (int i = 0; i < CL_GetMaxClients(); ++i){
|
||||
cl_entity_t *ent = CL_GetEntityByIndex(i);
|
||||
if (!ent || ent == localPlayer || ent->player != true) continue;
|
||||
//playerstate = &frame->playerstate[i];
|
||||
if (!ent || ent == localPlayer || ent->player != true /*|| playerstate->solid == SOLID_NOT*/) continue;
|
||||
|
||||
VectorSubtract(ent->origin, localPlayer->origin, aimDirection);
|
||||
VectorAngles(aimDirection, targetAngles);
|
||||
|
||||
angleDifference = fabsf(targetAngles[0] - currentAngles[0]) + fabsf(targetAngles[1] - currentAngles[1]);
|
||||
|
||||
if (angleDifference < minAngleDifference) {
|
||||
//Con_Printf("anglediff:%f\n",angleDifference);
|
||||
if ((angleDifference < minAngleDifference)){
|
||||
minAngleDifference = angleDifference;
|
||||
nearestTarget = ent;
|
||||
}
|
||||
|
@ -627,10 +607,30 @@ void CL_XrasherAimAssistSmart(usercmd_t *cmd) {
|
|||
VectorSubtract(nearestTarget->origin, localPlayer->origin, aimDirection);
|
||||
VectorAngles(aimDirection, targetAngles);
|
||||
|
||||
// Normalize pitch (aimDirection[0]) and yaw (aimDirection[1]) to -180 to 180 range
|
||||
aimDirection[0] = fmodf(aimDirection[0] + 180.0f, 360.0f);
|
||||
if (aimDirection[0] < 0) aimDirection[0] += 360.0f;
|
||||
aimDirection[0] -= 180.0f;
|
||||
aimDirection[1] = fmodf(aimDirection[1] + 180.0f, 360.0f);
|
||||
if (aimDirection[1] < 0) aimDirection[1] += 360.0f;
|
||||
aimDirection[1] -= 180.0f;
|
||||
|
||||
|
||||
// Apply aim assist by modifying the player's input angles
|
||||
cmd->viewangles[0] = targetAngles[0]; // Pitch
|
||||
cmd->viewangles[1] = targetAngles[1]; // Yaw
|
||||
|
||||
//Con_Printf("aimdirection:%f %f %f\n",aimDirection[0],aimDirection[1],aimDirection[2]);
|
||||
//Con_Printf("targetangles:%f %f %f\n",targetAngles[0],targetAngles[1],targetAngles[2]);
|
||||
Con_Print("FOUND TARGET\n");
|
||||
return;
|
||||
|
||||
//Test
|
||||
//cl.viewangles[0] = targetAngles[0];
|
||||
//cl.viewangles[1] = targetAngles[1];
|
||||
}
|
||||
|
||||
Con_Print("NO TARGET\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -644,35 +644,35 @@ void IN_EngineAppendMove( float frametime, usercmd_t *cmd, qboolean active )
|
|||
{
|
||||
float forward, side, pitch, yaw;
|
||||
|
||||
if( clgame.dllFuncs.pfnLookEvent )
|
||||
return;
|
||||
// if( clgame.dllFuncs.pfnLookEvent )
|
||||
// return;
|
||||
|
||||
if( cls.key_dest != key_game || cl.paused || cl.intermission )
|
||||
return;
|
||||
// if( cls.key_dest != key_game || cl.paused || cl.intermission )
|
||||
// return;
|
||||
|
||||
forward = side = pitch = yaw = 0;
|
||||
|
||||
if( active )
|
||||
{
|
||||
float sensitivity = 1;//( (float)cl.local.scr_fov / (float)90.0f );
|
||||
float sensitivity = 1;
|
||||
|
||||
IN_CollectInput( &forward, &side, &pitch, &yaw, false );
|
||||
|
||||
IN_JoyAppendMove( cmd, forward, side );
|
||||
|
||||
//Xrasher trigger bot
|
||||
//If there is a player in the way, shoot
|
||||
//CL_XrasherTriggerBot(cmd);
|
||||
|
||||
//Apply Xrasher's aimbot, right now only
|
||||
//activate if mouse is being clicked/held down
|
||||
if(cmd->buttons & IN_ATTACK || cmd->buttons & IN_ATTACK2){
|
||||
if(xrasher_aimnear.value == 1){
|
||||
CL_XrasherAimAssistNear(cmd);
|
||||
}
|
||||
if(xrasher_aimsmart.value == 1){
|
||||
CL_XrasherAimAssistSmart(cmd);
|
||||
if(xrasher_aim.value == 1){
|
||||
CL_XrasherAim(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
if( pitch || yaw )
|
||||
{
|
||||
if( pitch || yaw ){
|
||||
cmd->viewangles[YAW] += yaw * sensitivity;
|
||||
cmd->viewangles[PITCH] += pitch * sensitivity;
|
||||
cmd->viewangles[PITCH] = bound( -90, cmd->viewangles[PITCH], 90 );
|
||||
|
|
|
@ -690,7 +690,7 @@ qboolean R_Init( void )
|
|||
|
||||
// cvars that are expected to exist
|
||||
Cvar_Get( "r_speeds", "0", FCVAR_ARCHIVE, "shows renderer speeds" );
|
||||
Cvar_Get( "r_fullbright", "0", FCVAR_CHEAT, "disable lightmaps, get fullbright for entities" );
|
||||
Cvar_Get( "r_fullbright", "1", FCVAR_CHEAT, "disable lightmaps, get fullbright for entities" );
|
||||
Cvar_Get( "r_norefresh", "0", 0, "disable 3D rendering (use with caution)" );
|
||||
Cvar_Get( "r_dynamic", "1", FCVAR_ARCHIVE, "allow dynamic lighting (dlights, lightstyles)" );
|
||||
Cvar_Get( "r_lightmap", "0", FCVAR_CHEAT, "lightmap debugging tool" );
|
||||
|
|
Loading…
Add table
Reference in a new issue