MCPcopy Create free account
hub / github.com/demoth/jake2 / PM_DeadMove

Method PM_DeadMove

qcommon/src/main/java/jake2/qcommon/PMove.java:876–891  ·  view source on GitHub ↗

Dead bodies have extra friction.

()

Source from the content-addressed store, hash-verified

874 * Dead bodies have extra friction.
875 */
876 public static void PM_DeadMove() {
877 float forward;
878
879 if (null == pm.groundentity)
880 return;
881
882 // extra friction
883 forward = Math3D.VectorLength(pml.velocity);
884 forward -= 20;
885 if (forward <= 0) {
886 Math3D.VectorClear(pml.velocity);
887 } else {
888 Math3D.VectorNormalize(pml.velocity);
889 Math3D.VectorScale(pml.velocity, forward, pml.velocity);
890 }
891 }
892
893 public static boolean PM_GoodPosition() {
894 trace_t trace;

Callers 1

PmoveMethod · 0.95

Calls 4

VectorLengthMethod · 0.95
VectorClearMethod · 0.95
VectorNormalizeMethod · 0.95
VectorScaleMethod · 0.95

Tested by

no test coverage detected