CoolRemove Weapon Sway (Host Required)

PollShould I add this feature to Multi-Toolz Rezurrection
9 votes
Posts 1–14 of 14 · Page 1 of 1
Remove Weapon Sway (Host Required)
This source code will remove ADS sway while idle aiming, walk aiming and crouch aiming. This only works when you are the host and may affect all other players in the lobby (Not tested). Please answer the poll if you want me to put it in MultiToolz Rezurrection.

For 1.9.461:
Code:
-Nop these 3 addresses-

0x004AAE13
0x00555DB6
0x0059DFAA
Video Proof (Private Match):

Quote Originally Posted by NightmareTX_RETIRED View Post
This source code will remove ADS sway while idle aiming, walk aiming and crouch aiming. This only works when you are the host and may affect all other players in the lobby (Not tested). Please answer the poll if you want me to put it in MultiToolz Rezurrection.

For 1.9.461:
Code:
-Nop these 3 addresses-

0x004AAE13
0x00555DB6
0x0059DFAA
Video Proof (Private Match):

Is this really host only? I did it a different way and it seems to work....On dedi servers that is.
Quote Originally Posted by Kenshin13 View Post
Is this really host only? I did it a different way and it seems to work....On dedi servers that is.
How did you do it?

---------- Post added at 12:43 PM ---------- Previous post was at 12:41 PM ----------

Quote Originally Posted by Jorndel View Post
Why nop them?

There are Dvars that you can set to do this
Those dvars cant be modified. In Olly, the don't have MOV [XXXXXXXX],EAX for those dvars. Simply FLD [XXXXXXXX]. So you have to find what access to this float value.

Dvars Used:

player_breath_gasp_lerp
bg_viewbobmax (I Think x3)
Quote Originally Posted by NightmareTX_RETIRED View Post
How did you do it?

---------- Post added at 12:43 PM ---------- Previous post was at 12:41 PM ----------



Those dvars cant be modified. In Olly, the don't have MOV [XXXXXXXX],EAX for those dvars. Simply FLD [XXXXXXXX]. So you have to find what access to this float value.

Dvars Used:

player_breath_gasp_lerp
bg_viewbobmax (I Think x3)
player_breath_gasp_lerp - And that range is the dvars I speak of
Quote Originally Posted by Jorndel View Post


player_breath_gasp_lerp - And that range is the dvars I speak of
thats what im saying. They cant be modified by reading XXXXXXXX and Add C
Quote Originally Posted by NightmareTX_RETIRED View Post
thats what im saying. They cant be modified by reading XXXXXXXX and Add C
If you say so
Quote Originally Posted by NightmareTX_RETIRED View Post
thats what im saying. They cant be modified by reading XXXXXXXX and Add C
Well, you need to go more in-depth with illy to find it. IDA n HexRays are my favorite here.
Anyways in the weapon_t structure, for each weapon there is a WeaponSway_Multiplier and WeaponSway_ADS_Multiplier floating value.
I just used the player's current Weapon ID to locate it's structure and nulled those two floats. Same effect and bullets seemed to hit exact places when ADS and well it should work if you have the No_Spread enabled (Not the host-only kind, the one where you use the functions Cl_WritePacket hook.) but I'm not sure as I didn't test this one. The ADS on guns seem to work tho.
Quote Originally Posted by Kenshin13 View Post
Well, you need to go more in-depth with illy to find it. IDA n HexRays are my favorite here.
Anyways in the weapon_t structure, for each weapon there is a WeaponSway_Multiplier and WeaponSway_ADS_Multiplier floating value.
I just used the player's current Weapon ID to locate it's structure and nulled those two floats. Same effect and bullets seemed to hit exact places when ADS and well it should work if you have the No_Spread enabled (Not the host-only kind, the one where you use the functions Cl_WritePacket hook.) but I'm not sure as I didn't test this one. The ADS on guns seem to work tho.
Unfortunately, this is too advanced for me yet.
Why nop them?

There are Dvars that you can set to do this
offsets are for 1.4.382
Code:
typedef float vec_t;
typedef vec_t vec2_t[2];
Code:
#define punch_offset 0x97618C

typedef struct
{
    vec2_t PunchAngles;
}PunchAngles_t;

typedef struct
{    
    char unknown0[1128]; //0x0000
    DWORD a; //0x0468  
    float b; //0x046C
    float c; //0x0470 

}weaponsway_c;
typedef struct
{
    weaponsway_c *wswaypointer;
}weaponsway_t;
Code:
weapon_t * GetWeaponX( int Index )
{
    return*(weapon_t**)( 0x008DDB50 + 0x04 * Index );
}
void RemoveSway()
{
   
	PunchAngles_t*punch = (PunchAngles_t *)punch_offset;
	punch->PunchAngles[0] = 0.0f;
    punch->PunchAngles[1] = 0.0f;
	weaponsway_t *weaponsway = (weaponsway_t*)GetWeaponX(Entity[CG->ClientNum]->WeaponID);
	if (weaponsway)
	{
        weaponsway->wswaypointer->a = 0;
        weaponsway->wswaypointer->b = 0;
        weaponsway->wswaypointer->c = 0;
    }    
	
}
seems to be work fine.... (even without being host.. and in dedicated servers too)

credits : to whoever found this ( i forgot)
Quote Originally Posted by mwxplayer View Post
offsets are for 1.4.382
*copy-pasted code*
seems to be work fine.... (even without being host.. and in dedicated servers too)

credits : to whoever found this ( i forgot)
No, that is incorrect. Just like nospread, this is calculated server-side. Instead of nulling the angles, read them and compensate for them in your aim angles.
Quote Originally Posted by rawr im a tiger View Post
No, that is incorrect. Just like nospread, this is calculated server-side. Instead of nulling the angles, read them and compensate for them in your aim angles.
Thought No-Spread took this into consideration already?
Just like nospread, this is calculated server-side.
So if i'm using a VIP-Hack with NoSpread i'm always host?
Quote Originally Posted by ~Syphox View Post
So if i'm using a VIP-Hack with NoSpread i'm always host?
Not necessary. It could just be editing your packets you send to the server.
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?