hlsdk

Charge-dependent gravity

Oct 25th, 2010
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. double C_TFCompoundBow::GetProjectileGravity()
  2. {
  3.     double charge = (float)this->GetCurrentCharge();
  4.     if (charge > 0)
  5.     {
  6.         if (charge <= 1.0)
  7.             return (charge * -0.4 + 0.5);
  8.         else
  9.             return 0.01;
  10.     }
  11.     else
  12.         return 0.5;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment