Created
September 19, 2016 20:36
-
-
Save sigsegv-mvm/b9e93b9d452edfbafb555bed024d7902 to your computer and use it in GitHub Desktop.
Airblast impulse magnitude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function either does not really exist or is consistently inlined | |
// the logic comes from CTFFlameThrower::DeflectPlayer, shortly before the call to CTFPlayer::ApplyAirBlastImpulse | |
float CalculateAirblastImpulseMagnitude(CTFPlayer *pVictim) | |
{ | |
// OBBSize() = m_vecMaxs - m_vecMins | |
Vector vecSize = pVictim->CollisionProp()->OBBSize(); | |
return (float)(188928.0 / (vecSize.x * vecSize.y * vecSize.z) * 360.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment