Raised This Month: $32 Target: $400
 8% 

Anyone knows how painshock works actually ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-11-2017 , 19:47   Anyone knows how painshock works actually ?
Reply With Quote #1

Anyone here knows how the painshock works in counter strike ?

For example what it actually does, and what is the formula of the calculus..
__________________
Depresie is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 10-12-2017 , 03:31   Re: Anyone knows how painshock works actually ?
Reply With Quote #2

here is something https://github.com/s1lentq/ReGameDLL...layer.cpp#L678
and here https://github.com/s1lentq/ReGameDLL...ayer.cpp#L1265
__________________
retired chump

Last edited by DjSoftero; 10-12-2017 at 04:05.
DjSoftero is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-12-2017 , 16:04   Re: Anyone knows how painshock works actually ?
Reply With Quote #3

So m_flVelocityModifier is actually m_flPainShock alias value 108, because seems it looks like it, but i'm not sure

I searched through amxx documentation and i couldn't find m_flVelocityModifier, while there is no m_flPainShock in the regame files..

Later Edit

Yep, m_flVelocityModifier seems to be m_flPainShock as talked about here
https://forums.alliedmods.net/showth...=247485&page=2

Thanks, i've been looking for hours on the regame github last night to find m_flPainShock lol..
__________________

Last edited by Depresie; 10-12-2017 at 16:11.
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-13-2017 , 05:48   Re: Anyone knows how painshock works actually ?
Reply With Quote #4

And that's why is good to name offsets as they are named in game. Dunno why people still call them OFFSET_SOME_CRAP_NAME. But hey, "it works like that too", righ? Right?
__________________
HamletEagle is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 10-13-2017 , 11:13   Re: Anyone knows how painshock works actually ?
Reply With Quote #5

@Depresie https://github.com/alliedmodders/amx....txt#L122-L129 mm? 108*4=432
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-13-2017 , 20:29   Re: Anyone knows how painshock works actually ?
Reply With Quote #6

Quote:
Originally Posted by PRoSToTeM@ View Post
Thanks, didn't think to look on the amxx git hub, i was looking for it here but it is defined as m_flPainShock https://wiki.alliedmods.net/CBasePlayer_(CS)
__________________

Last edited by Depresie; 10-13-2017 at 20:30.
Depresie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2017 , 05:49   Re: Anyone knows how painshock works actually ?
Reply With Quote #7

Feel free to update the page! But yeah, a more reliable source is on github.
__________________

Last edited by Arkshine; 10-14-2017 at 05:50.
Arkshine is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-14-2017 , 10:57   Re: Anyone knows how painshock works actually ?
Reply With Quote #8

We could have an include file with all those offsets in the amxx package i guess, i could make one, but i would like to get permission for it first..
__________________
Depresie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2017 , 10:59   Re: Anyone knows how painshock works actually ?
Reply With Quote #9

It's already in the amxx package, see /data/gamedata/.
__________________
Arkshine is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-14-2017 , 11:08   Re: Anyone knows how painshock works actually ?
Reply With Quote #10

I was thinking about an include file with them defined as stock constants, to not have to define them in every plugin
But i don;t know if that would be a good idea tho
__________________

Last edited by Depresie; 10-14-2017 at 11:09.
Depresie is offline
Reply


Thread Tools
Display Modes

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 15:40.


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