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

Pain Shock Free


Post New Thread Reply   
 
Thread Tools Display Modes
jim_yang
Veteran Member
Join Date: Aug 2006
Old 09-02-2011 , 21:16   Re: Pain Shock Free
Reply With Quote #31

found something interesting in CBasePlayer::TakeDamage
Code:
if ( !(this->pev->flags & FL_GODMODE) && m_LastHitGroup != HIT_LEFTLEG && m_LastHitGroup != HIT_RIGHTLEG )
    {
      switch ( thisAttacker->m_pActiveItem->m_iId )
      {
        case CSW_SCOUT:
        case CSW_AUG:
        case CSW_SG550:
        case CSW_AWP:
        case CSW_M3:
        case CSW_M4A1:
        case CSW_G3SG1:
        case CSW_DEAGLE:
        case CSW_SG552:
        case CSW_AK47:
          v88 = v85 + 32;
          if ( this->pev->velocity.Length() < 300.0 )
          {
            v89 = *(_DWORD *)(v65 + 4);
            v90 = this->pev->origin.x - thisAttacker->pev->origin.x;
            v138 = this->pev->origin.y - thisAttacker->pev->origin.y;
            v91 = this->pev->origin.z - thisAttacker->pev->origin.z;
            v139 = v91;
            v92 = sqrt(v91 * v139 + v138 * v138 + v90 * v90);
            if ( v92 == 0.0 )
            {
              v93 = 0.0;
              v94 = 0.0;
              v140 = 1.0;
            }
            else
            {
              v95 = 1.0 / v92;
              v93 = v90 * v95;
              v94 = v138 * v95;
              v140 = v139 * v95;
            }
            *(_DWORD *)(this + 432) = 0.65;
            v96 = v93 * 170.0;
            v97 = v96 + this->pev->velocity.x;
            v98 = v94 * 170.0 + this->pev->velocity.y;
            v99 = v140 * 170.0 + this->pev->velocity.z;
            *(_DWORD *)v88 = LODWORD(v97);
            this->pev->velocity.y = LODWORD(v98);
            v100 = v99;
            this->pev->velocity.z = LODWORD(v100);
          }
          v130 = 8;
          break;
        default:
          goto LABEL_139;
      }
      goto LABEL_146;
    }
LABEL_139:
    *(_DWORD *)(this + 432) = 0.5;
seems this caused the so called bug, to remove this, use orpheu hack the value 300.0 to 0 is the easiest way.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-03-2011 , 03:14   Re: Pain Shock Free
Reply With Quote #32

To see better :

Code:
[...]             if( ShouldDoLargeFlinch( m_LastHitGroup, iAttackerWeaponId ) )             {                 if( pev->velocity.Length() < 300 )                 {                     pev->velocity = pev->velocity + ( pev->origin - pAttacker->pev->origin ).Normalize() * 170;                     m_flPainShock = 0.65;                 }                 iAnim = PLAYER_LARGE_FLINCH;             }             else             {                 m_flPainShock = 0.50;                 m_fKilledByHeadshot = FALSE;                 if( m_LastHitGroup == HITGROUP_HEAD && flDamage > 60 )                 {                     m_fKilledByHeadshot = TRUE;                 }                 else if( flDamage <= 20 )                 {                     m_fKilledByHeadshot = FALSE;                 }                 iAnim = PLAYER_SMALL_FLINCH;             }             SetAnimation( iAnim );         } [...]
__________________
Arkshine is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 09-03-2011 , 05:14   Re: Pain Shock Free
Reply With Quote #33

I'm working on a pain shock free if victim with knife for his active item, but seems there is no good place to hook.
goal is to remove velocity adjust and set m_painshock to 1.0 when victim carry a knife for his active item. from the disasm code, no good place to set a jump...
sigh
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Old 04-15-2014, 17:00
mrakus
This message has been deleted by mrakus. Reason: solved
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 08-29-2018 , 15:00   Re: Pain Shock Free
Reply With Quote #34

can i get this plugin for cts ? like if ct stab ts ct will slow down for a sec not terrorist slow down
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
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 13:26.


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