调整后坐力曲线
This commit is contained in:
parent
409218f7bf
commit
b9e66c7abc
2 changed files with 5 additions and 5 deletions
|
@ -327,17 +327,17 @@ public class PlayerEventHandler {
|
|||
recoil = recoil + 0.017 * (2.4 - recoil);
|
||||
|
||||
double sinRes = 0;
|
||||
sinRes = 1 * Math.sin(Math.PI * (2 * recoil - 1)) * (0.5 / (2 * recoil - 1));
|
||||
sinRes = 1.1 * Math.sin(Math.PI * (2 * recoil - 1)) * (0.5 / (2 * recoil - 1));
|
||||
|
||||
if (sinRes < 0){
|
||||
sinRes = 4 * sinRes;
|
||||
sinRes = 3.5 * sinRes;
|
||||
}
|
||||
|
||||
float newPitch = ((float) (player.getXRot() - 5f * recoilY * ry * (sinRes + Mth.clamp(0.8 - recoil,0,0.8))));
|
||||
player.setXRot(newPitch);
|
||||
player.xRotO = player.getXRot();
|
||||
|
||||
float newYaw = ((float) (player.getYRot() - 5f * recoilYaw * recoilX * rx * sinRes));
|
||||
float newYaw = ((float) (player.getYRot() - 4f * recoilYaw * recoilX * rx * sinRes));
|
||||
player.setYRot(newYaw);
|
||||
player.yRotO = player.getYRot();
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"zoom_speed": 1.6,
|
||||
"zoom": 1.25,
|
||||
"dev": 3.5,
|
||||
"recoil_x": 0.011,
|
||||
"recoil_y": 0.004,
|
||||
"recoil_x": 0.007,
|
||||
"recoil_y": 0.007,
|
||||
"damage": 4.5,
|
||||
"headshot": 1.5,
|
||||
"velocity": 14,
|
||||
|
|
Loading…
Add table
Reference in a new issue