又调整后坐力曲线
This commit is contained in:
parent
b9e66c7abc
commit
314797336e
1 changed files with 3 additions and 3 deletions
|
@ -324,13 +324,13 @@ public class PlayerEventHandler {
|
||||||
if (recoil >= 2) recoil = 0d;
|
if (recoil >= 2) recoil = 0d;
|
||||||
|
|
||||||
if (0 < recoil && recoil < 2) {
|
if (0 < recoil && recoil < 2) {
|
||||||
recoil = recoil + 0.017 * (2.4 - recoil);
|
recoil = recoil + 0.013 * (2.5 - recoil);
|
||||||
|
|
||||||
double sinRes = 0;
|
double sinRes = 0;
|
||||||
sinRes = 1.1 * Math.sin(Math.PI * (2 * recoil - 1)) * (0.5 / (2 * recoil - 1));
|
sinRes = 0.9 * Math.sin(Math.PI * (2 * recoil - 1)) * (0.5 / (2 * recoil - 1));
|
||||||
|
|
||||||
if (sinRes < 0){
|
if (sinRes < 0){
|
||||||
sinRes = 3.5 * sinRes;
|
sinRes = 4 * sinRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
float newPitch = ((float) (player.getXRot() - 5f * recoilY * ry * (sinRes + Mth.clamp(0.8 - recoil,0,0.8))));
|
float newPitch = ((float) (player.getXRot() - 5f * recoilY * ry * (sinRes + Mth.clamp(0.8 - recoil,0,0.8))));
|
||||||
|
|
Loading…
Add table
Reference in a new issue