PDA

View Full Version : Recoil Fix


MPNumB
01-03-2013, 08:57
Description:
Have you ever watched someone play while being dead, and questioned yourself, why their bullets go directly into the middle of the crosshair when they are spraying like hell, while your go way above the crosshair? Well, I did, and found the answer. While you are spectating someone, you see their middle of the screen twice higher than they do (you see twice the recoil they actually do). Well, this plugin has many features, one of which is making you see the exact the same recoil, the spectated person has.


Requires:
FakeMeta
HamSandWich


Cvars:

* "recoil_fix" - state of the plugin.
- "0" - disabled.
- "1" - fix visual recoil for dead (make dead see what alive normally do). [default]
- "2" - fix visual recoil for alive (make alive see what dead normally do).
- "3" - the way it's meant to be (see additional info).


Additional info:
Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg20). Setting "recoil_fix" cvar to "3" or above, will change the actual recoil. It will make it twice smaller, therefor all spread bullets will go close to the crosshair (not extremely above it, as you are used to). This is the way it was intended to be in the first place long long time ago. It will also change visual recoil for dead. However I do not recommend setting the cvar to anything but "1", cause... Well "3" or above is changing the actual gameplay, and people can get confused why their bullets are going not as high as expected (they would actually go fairly near the corsshair), and "2" can also confuse people, why their recoil is twice stronger than expected, while actually it's the same (only visual location of crosshair changes).


Notes:
Just imagine the amount of the people who got falsely blamed and banned for using no-recoil script or some other cheat... I had this plugin idea for quite some time, and people tried to convince me that it has nothing to do with that... Well, I looked into it, and even some no-recoil scripts - I laughed, seriously, those things do nothing but make the game harder, at least in my opinion.


Warnings:
Some bots may have a few issues with this plugin, cause by default they may be having a twice lower recoil already (for example Potti - a controllable fakeplayer (http://forums.alliedmods.net/showthread.php?p=255078) plugin/bot). So, having "recoil_fix" set to "1" may have an effect of no recoil for the dead person watching the alive bot. Setting it to "2", should have no effect on bots at all. Setting it to "3" or above, may cause issues of bots having no recoil what so ever.


Change-Log:

* 1.0
- First release.

bibu
01-03-2013, 11:59
Description:
While you are spectating someone, you see their middle of the screen twice higher than they do (you see twice the recoil they actually do)

Where did you get this information?

MPNumB
01-03-2013, 19:19
Where did you get this information?

Observations, and later tests to confirm or disprove it. Well, it got confirmed.

XINLEI
01-04-2013, 10:44
Isn't the same thing cl_lw 0?

MPNumB
01-04-2013, 10:48
Isn't the same thing cl_lw 0?
Nope.

Mofforg
01-04-2013, 20:58
MPNumB, isn't it an updated version of your 'Accuracy fix'??

MPNumB
01-04-2013, 23:05
MPNumB, isn't it an updated version of your 'Accuracy fix'??

No. Accuracy fix fixes the bullet trajectory calculation (how much off from recoil it should go). Recoil is how much kick out of the gun you get - how much up/left/right your screen goes *0.5 of what's actually happening. And this plugin fixes that *0.5 glitch in various ways (depends what you set cvar to). In 1 or 2, it's only visual effect. In case 3 It will actually force the actual bullet trajectory to be 0.5 of the recoil, making bullets go not somewhere above crosshair, but fairly near to it.

For example, if Accuracy Fix plugin, would always give the perfect accuracy, and recoil_fix cvar would be set to 3, than all your bullets would always go in the middle of the crosshair. If accuracy fix would always give perfect accuracy and recoil_fix would would would be set to 2, than you'd see double-size recoil, but all your bullets would still go in the middle of crosshair. But since accuracy fix, fixes the glitch in calculation, and doesn't give perfect accuracy when spraying, bullets would go near the crosshair, but not perfectly in the middle of it, when spraying.

I hope you 2 understand now, that there are 2 things going on, when spraying. The punch angle - your screen angle changes (and by default for dead it's twice the much as for alive), and spread - the more you spray, the larger the area around the bullet will go from the punch angle.

I know, it's hard to explain... Imagine this... You are standing with ak47, you'r angle was 0vertical and 0horizontal. Now you were spraying a bit. Your angle changed to 5vertical and 2horizontal, and at this point you shoot a bullet. Now this bullet should go at 10vertical and 4horizontal (double what you normally see), but it's not the end of it.. Since you were spraying, you'r spread has a high value as well, so now you'r bullet will go lets say 1 angle in any direction from 10vertical and 4horizontal. Understood the difference between recoil and spread?

So, for dead, they see 10vertical and 4horizontal, when alive see 5vertical, and 2horizontal. This plugin when "recoil_fix" is set to 1, will make dead see 5vertical and 2horizontal (just the same as alive normally do). When it's set to 2, alive will see 10vertical and 4horizonta, instead of 5vertical and 2horizontal (just as dead normally do). When it's 3, dead will see 5vertical and 2horizontal (just as alive normally do), while bullet trajectory without spread offset will also be 5vertical and 2horizontal (not 10vertical and 4horizontal). I hope this makes it clear, and I wont have to draw it. :D

Mofforg
01-05-2013, 00:40
Thx for long story :D
Not much to be really understandable. My main aim is to balance between CPU load to server and comfortable game.

So i have to ask you. I need player's to stay comfortable (when they shoot - it should goes to the right direction) and truly (what they see - should be real) but with that i want CPU load stays at minimum level. Now on CentOS 5.8 i have 20% CPU load for 32/32 with many tweaks. It looks like that accuracy fix can make many load to the server (i just looked at code) and this fix (recoil fix) should make less load either with 1 or 3 cvar value.

What do you advice me to use? Accuracy fix && Recoil fix && both && none?

MPNumB
01-06-2013, 12:30
Accuracy Fix (you can't make it use even less resources than what it does now). And recoil_fix with set to 1.

Mofforg
01-08-2013, 20:31
Accuracy Fix (you can't make it use even less resources than what it does now). And recoil_fix with set to 1.
How much resources of CPU, by your opinion, it should (can?) use summary?

MPNumB
01-10-2013, 08:10
The amount of CPU it uses is minimum possible for such an action... I don't understand why we are even having this conversation. Accuracy fix should use about the same amount of CPU as miscstats plugins, if not less.

When I'm coding plugins here are my priorities:
1. Works.
2. Reliable.
3. CPU.
4. Everything else.

About this recoil_fix plugin - it uses low CPU usage anyways, and I can make it even less, but than I'd have to remove the cvar and make #define's in the code, and upload 3 different versions with one or two lines commented, which will most probably result in this plugin being unapproved.

In other words, it doesn't use much CPU anyway, it could use even less, but that's will result in this plugin being unapproved, cause it will be too complicated for some people to understand that they should put only 1 out of 3 plugins on their server. And to make it use even less CPU - buy CS1.6SDK from VALVe for about 1 million $, edit a few lines, and it's at absolute minimum.

Mofforg
01-10-2013, 21:18
Ok. I'll anyway remove all cvars. So it's meaningless.

jeremyfreitas
09-25-2013, 12:26
Hello guys, can this plugin on my vip menu with price? Thank you

tonykaram1993
09-25-2013, 17:46
Hello guys, can this plugin on my vip menu with price? Thank you

I don't understand you people, you want everything to work for vip? This is not what this plugin was is made for.

Commy
10-02-2013, 02:23
I don't understand you people, you want everything to work for vip? This is not what this plugin was is made for.

People like to give VIP's too much power and then sell them to make money...Seen too many servers ruined by this, especially zombie mods.

Anyway I've always wondered why is it that I see the fella shooting everywhere except at the opponent and he still always hits...This explained it for me, interesting plugin ^^

tonykaram1993
10-02-2013, 05:34
They can always sell admin, they don't have to call it VIP. Just don't give them ADMIN_BAN flag and it's exactly like VIP.

souvikdas95
07-26-2014, 15:46
@MPNumB - so are you going to update it for the new HLDS 1.1.2.7 ?

MPNumB
07-26-2014, 22:42
@MPNumB - so are you going to update it for the new HLDS 1.1.2.7 ?

It's not working for you at new hlds? How have you came to this conclusion?

souvikdas95
07-27-2014, 00:34
i tried cvar '3' but it did not show any noticeable change in recoil ( tested with AK-47, M4A1 )... so i thought maybe because it was released before the new HLDS. I feel that AK-47 in new HLDS has too much of a recoil. Even spraying closely with it hardly hits the body and mostly late headshots only even if we start spraying from the stomach of the player.

MPNumB
07-31-2014, 15:57
Setting 3 wont give no visible changes. Even with cl_lw 0 it may not give no changes. But if you try with some breakable object, or make a plugin which will show impact locations, or enable debug which will show impact location (remove "//" before "#define DEBUG" and re-compile), you will see what I mean.

cancan
04-18-2020, 12:29
Hello friend,

I would like to use your plugin but players say that when we use your wonderfull recoil fix plugin, enemy team doesnt get flash and me too.

If you can solve this problem I will be really happy.

Thank you very much.