Add per-actor friction
- This is multiplied by the sector's friction. - This is intentionally not serialized yet, while awaiting feedback.
This commit is contained in:
parent
0f8a0020ed
commit
ea7ba9dba3
7 changed files with 47 additions and 18 deletions
|
|
@ -554,7 +554,13 @@ int P_GetFriction (const AActor *mo, int *frictionfactor)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mo->Friction != FRACUNIT)
|
||||
{
|
||||
friction = clamp(FixedMul(friction, mo->Friction), 0, FRACUNIT);
|
||||
movefactor = FrictionToMoveFactor(friction);
|
||||
}
|
||||
|
||||
if (frictionfactor)
|
||||
*frictionfactor = movefactor;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue