Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. double friction = P_GetFriction (mo, NULL);
  2. double currentspeed = mo->Vel.XY().LengthSquared();
  3. if((!(mo->Z() > mo->floorz) && !(mo->flags2 & MF2_FLY) && !(mo->flags2 & MF2_ONMOBJ)) // Only apply friction if on ground,
  4. || currentspeed >= 49.) // or if travelling faster or equal to running speed while in midair -Blastfrog
  5. {
  6.     mo->Vel.X *= friction;
  7.     mo->Vel.Y *= friction;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement