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

Accuracy Fix


Post New Thread Reply   
 
Thread Tools Display Modes
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 09-06-2011 , 16:25   Re: Accuracy Fix
Reply With Quote #11

As I understood you are interested in the main purpose of this plugin (fix accuracy calculation). I didn't really understood this part "always calculated as the accuracy of a shot still part of the spray.", but I do understand what question you are asking. I cannot answer "yes" or "no" to that, but the way it works is this: Your current shot uses accuracy of your previous shot. However most of the guns after switch or reload have accuracy of first shot as it meant to be. But if you don't reload or switch your weapon, you wont ever have bullet as accurate as the first one. Some amxmodx coders as far as I know, have been aware of this for years. However mathematical calculation of in what vector bullet is heading is still unknown (as far as I know). Known is only existence of how accuracy value is changed during shooting and other factors.

As far as I am aware, I noticed this bug back in CS1.5 times, but I thought back then it was a reg glitch. My m4a1 bullet went like half a screen away from the crosshair (though I was runing then). That also was one of my most remembered moments of CS - made a headshot.

But back to topic. First I found out about this bug when I first got my eyes on amxx coders attempt to create a read-only cs-sdk. I remember clearly, I wanted to inform exolent and/or arkshine that this can't be right. I don't remember did I or didn't, but that's not important now, cause that code so far seems accurate.

This glitch didn't stay long in my head, until in steam Counter-Strike Source forum I found a thread with "discussion" (so to speak - more like trolling actually) about css having the same issue. It had some youtube link to it, which unfortunately I cannot find any longer - that video showed the same issue as in 1.6. After that for the first time I decided to test it myself, and guess what - this bug exists after all... Back then I remember first had the idea of making this plugin, but decided not to. Some weeks ago I found out about release of "Counter-Strike: Global Offensive", what I was quite interested in, but later how always got disappointed in VALVe. However during that time I made my research and CSS Pro players who beta tested the game, mentioned that first bullet was always dead on center. That reminded me about this plugin idea once again, but like before I thought "not worth the time". And the thing what finally forced me to do it was... I have a friend in steam who is also a really good friend in life, once told me that I suck with ak47. That I should try training with it. He personally is an ak47 pro in my opinion - more than 50% of kills are headshot. So he tried to train me and always kept telling "aim for the head, aim for the head!". I was doing exactely that, but with no luck - my bullets simply were going anywhere but in the middle of the crosshair. That's when I said "ok, that plugin seriously needs to be done, cause this s*cks hard...". Two days later I made a beta version of the plugin, and invited him, he confirmed, that game now felt more like he expects it to be (expects where the bullet should fly). After that I invited some more people from my friends list to also confirm this, and they all said that it's much better - more factor of skill, and less factor of luck. After I just wrote comments on the top of the .sma of what this plugin is designed to do, changed name from "test" to "Accuracy Fix", and same with .sma file, uploaded it, and here we are having this discussion.

// EDIT:

And answer to your question how accuracy works in CS: There is a variable what engine uses to determine how accurate comparing to crosshair position bullet is heading (even with punchangle [when spraying]). By logic this variable should be calculated before the shot is actually made (in the same moment, but few lines above the actual code when bullet gets fired). However it isn't - it's calculated after the position where it needs to be... And that's why we are having this glitch.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 09-06-2011 at 16:44.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-06-2011 , 16:49   Re: Accuracy Fix
Reply With Quote #12

Your answer makes sense. I did not understand fully before.

By the way :

- Please factorize your code, really. You can reduce drastically the whole code and would be less pain to review.
- I'm the author of cssdk and there is no credit. Without that, this plugin would not have existed. Please fix it.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 09-06-2011 , 16:52   Re: Accuracy Fix
Reply With Quote #13

Quote:
Originally Posted by Arkshine View Post
Your answer makes sense. I did not understand fully before.

By the way :

- Please factorize your code, really. You can reduce drastically the whole code and would be less pain to review.
- I'm the author of cssdk and there is no credit. Without that, this plugin would not have existed. Please fix it.
Ok, I'll give credit. However about factorizing the code, I must disagree. Almost every weapon has a different calculation. Code would be somewhat shorter, however, it would use much more variables with cells and/or much more "if's" and I don't want to do that on event what happens so often as weapon shooting.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-06-2011 , 17:03   Re: Accuracy Fix
Reply With Quote #14

How stubborn ! But it's ok. I will kill you another time.
__________________
Arkshine is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 09-06-2011 , 17:22   Re: Accuracy Fix
Reply With Quote #15

Quote:
Originally Posted by Arkshine View Post
How stubborn ! But it's ok. I will kill you another time.
Yes, I know, everybody hates to read my codes. But hey, they work and use less resources.

Also added the credits, and re-uploaded the plugin, with credits. Didn't change the version, cause there was no change in the functioning code itself (is just a few lines below, that's all).

Personal record: 78 downloads reset.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 09-06-2011 , 17:48   Re: Accuracy Fix
Reply With Quote #16

Ok, so I had understand wrong and the bug is bigger than I thought. Congratulations for finding it and thanks for the post.
joaquimandrade is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 09-06-2011 , 18:00   Re: Accuracy Fix
Reply With Quote #17

Thanks, and you'r welcome.

Also, may you guys comment on new description? I tried to make it a bit more clear - did it work?
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-06-2011 , 18:02   Re: Accuracy Fix
Reply With Quote #18

:: awaits quim or arkshines magical orpheu fix ::
__________________
Bugsy is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 09-06-2011 , 18:06   Re: Accuracy Fix
Reply With Quote #19

Yes, at the beginning I was thinking about using Orpheu myself, but than I realized, that it's still isn't used by server admins as much as HamSandWich is. So I improvised. Plus if I remember right, not all of the functions related to weapon fire can be hooked/triggered as Arkshine once told me. I think the specific function was "FireBullets(...)".
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
cFG
SourceMod Donor
Join Date: Aug 2009
Location: Poland, Łódź
Old 09-06-2011 , 18:10   Re: Accuracy Fix
Reply With Quote #20

Damn man, if this work as you posted in description, your plugin - as someone said before - 'll be #1 installed and most important/demand for gameplay.

I appreciate your work, good job!

It'll be good to provide those videos on youtube instead of downloading 'em - easier to compare the results before installation and after.
__________________
HLXBans - worthy successor of AMXBans

Last edited by cFG; 09-06-2011 at 18:13.
cFG 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 18:58.


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