Raised This Month: $51 Target: $400
 12% 

Reducing Recoil In CS: Source


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 06-08-2009 , 21:52   Reducing Recoil In CS: Source
Reply With Quote #1

Does anyone know how I can reduce recoil for clients but from the serverside in Counter Strike Source? I looked over some weaponmod script for eventscripts that has a recoil modification feature but it's been ages since I've coded anything in ES and it all just looks like <insert foreign language here>.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 06-08-2009 , 22:46   Re: Reducing Recoil In CS: Source
Reply With Quote #2

I believe recoil uses vecPunch (or something like that) so resetting that to 0 on weapon_fire works.. kinda. It's really choppy. And that makes no recoil at all, limiting would be a little more complicated.
__________________
Greyscale is offline
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 06-08-2009 , 23:10   Re: Reducing Recoil In CS: Source
Reply With Quote #3

When I try doing the following during weapon_fire event, it doesn't seem to reduce recoil at all.

Code:
new Float:attacker_playerPunchAnglePost[3] = {0.0,0.0,0.0};

SetEntPropVector(attacker_playerClient, Prop_Send, "m_vecPunchAngle", attacker_playerPunchAnglePost);
What am I doing wrong here?
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
SAMURAI16
BANNED
Join Date: Sep 2006
Old 06-09-2009 , 05:21   Re: Reducing Recoil In CS: Source
Reply With Quote #4

set that in ClientPrethink
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 06-09-2009 , 10:54   Re: Reducing Recoil In CS: Source
Reply With Quote #5

I'm sorry to be a stick in the mud but is it necessary that I set it in ClientPrethink? The first two posts here, https://forums.alliedmods.net/showth...chAngle&page=2 , seem to imply that it can be done in weapon_fire.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
SAMURAI16
BANNED
Join Date: Sep 2006
Old 06-09-2009 , 10:59   Re: Reducing Recoil In CS: Source
Reply With Quote #6

IIRC last time I used in Prethink
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 06-10-2009 , 12:25   Re: Reducing Recoil In CS: Source
Reply With Quote #7

Ok I'm still working on this. When setting modifying recoil in event pre weapon_fire I noticed two things

Code:
new Float:attacker_playerPunchAnglePost[3] = {0.0,0.0,0.0};
                         SetEntDataVector(attacker_playerClient,offset_PlayerPunchAngle,attacker_playerPunchAnglePost,false);
Does nothing. But... changing

Code:
new Float:attacker_playerPunchAnglePost[3] = {600.250,0.0,140.0};
Makes me look in a ton of different directions.

I'm still trying to hook this on weapon_fire as I'm convinced by Fredd and SumGuys posts that you can change recoil to 0 without resorting to Prethink. Can anyone help?
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 06-11-2009 , 20:15   Re: Reducing Recoil In CS: Source
Reply With Quote #8

Code:
new Float:attacker_playerPunchAnglePost[3] = {0.0,0.0,0.0};
                         SetEntDataVector(attacker_playerClient,offset_PlayerPunchAngle,attacker_playerPunchAnglePost,true);
Try that in weapon_fire.

What exactly is ClientPreThink? I've never seen or used it.
__________________
Greyscale is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 06-12-2009 , 06:59   Re: Reducing Recoil In CS: Source
Reply With Quote #9

It's a hook that DukeHacks has, it fires every frame for every client, before what they're going to do actually happens. Thus you can for example check if they're going to attack and then block it.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 06-13-2009 , 16:45   Re: Reducing Recoil In CS: Source
Reply With Quote #10

That sounds extremely useful.
__________________
Greyscale is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode