Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double friction = P_GetFriction (mo, NULL);
- double currentspeed = mo->Vel.XY().LengthSquared();
- if((!(mo->Z() > mo->floorz) && !(mo->flags2 & MF2_FLY) && !(mo->flags2 & MF2_ONMOBJ)) // Only apply friction if on ground,
- || currentspeed >= 49.) // or if travelling faster or equal to running speed while in midair -Blastfrog
- {
- mo->Vel.X *= friction;
- mo->Vel.Y *= friction;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement