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

Method SV_CalcRoll

game/src/main/java/jake2/game/PlayerView.java:84–101  ·  view source on GitHub ↗

SV_CalcRoll.

(float[] angles, float[] velocity)

Source from the content-addressed store, hash-verified

82 * SV_CalcRoll.
83 */
84 private float SV_CalcRoll(float[] angles, float[] velocity) {
85 float sign;
86 float side;
87 float value;
88
89 side = Math3D.DotProduct(velocity, right);
90 sign = side < 0 ? -1 : 1;
91 side = Math.abs(side);
92
93 value = sv_rollangle.value;
94
95 if (side < sv_rollspeed.value)
96 side = side * value / sv_rollspeed.value;
97 else
98 side = value;
99
100 return side * sign;
101 }
102
103 /**
104 * Handles color blends and view kicks

Callers 1

ClientEndServerFrameMethod · 0.95

Calls 1

DotProductMethod · 0.95

Tested by

no test coverage detected