static void Postfix(NeckLookCalcVer2 __instance) { __instance.calcLerp = 0.8f; foreach (var item in __instance.neckTypeStates) { if (item.lookType == NECK_LOOK_TYPE_VER2.TARGET) { item.limitBreakCorrectionValue = 89f; item.leapSpeed = 3f; } } }
public override void Do() { base.Do(); int num1 = 0; CommandController commandController = this.scenario.commandController; string[] args1 = this.args; int index1 = num1; int num2 = index1 + 1; int no = int.Parse(args1[index1]); NeckLookCalcVer2 neckLookScript = commandController.GetChara(no).chaCtrl.neckLookCtrl.neckLookScript; string[] args2 = this.args; int index2 = num2; int num3 = index2 + 1; int num4 = bool.Parse(args2[index2]) ? 1 : 0; neckLookScript.skipCalc = num4 != 0; }
private void UpdateCamera() { if (leftEye == null || rightEye == null) { Restore(); return; } if (!CameraEnabled) { if (Input.GetMouseButton(1)) { GameCursor.Instance.SetCursorLock(true); currentfov = Mathf.Clamp(currentfov + Input.GetAxis("Mouse X") * Time.deltaTime * 30f, 1f, MAXFOV); } else if (Input.GetMouseButton(0) && DragManager.allowCamera) { GameCursor.Instance.SetCursorLock(true); float rateaddspeed = 2.5f; float num = Input.GetAxis("Mouse X") * rateaddspeed; float num2 = Input.GetAxis("Mouse Y") * rateaddspeed; rot += new Vector2(-num2, num) * new Vector2(sensitivityX, sensitivityY).magnitude; } else { GameCursor.Instance.SetCursorLock(false); } } if (Input.GetKeyDown(KeyCode.Semicolon)) { currentfov = TogglePOV.DefaultFov.Value; } if (Input.GetKey(KeyCode.Equals)) { currentfov = Mathf.Max(currentfov - Time.deltaTime * 15f, 1f); } else if (Input.GetKey(KeyCode.RightBracket)) { currentfov = Mathf.Min(currentfov + Time.deltaTime * 15f, 100f); } if (Input.GetKeyDown(KeyCode.UpArrow)) { offset = Mathf.Min(offset + 0.0005f, 2f); if (currentBody.sex == 0) { MALE_OFFSET = offset; } else { FEMALE_OFFSET = offset; } } else if (Input.GetKeyDown(KeyCode.DownArrow)) { offset = Mathf.Max(offset - 0.0005f, -2f); if (currentBody.sex == 0) { MALE_OFFSET = offset; } else { FEMALE_OFFSET = offset; } } Camera.main.fieldOfView = currentfov; Camera.main.nearClipPlane = nearClip; DepthOfField = false; Shield = false; NeckLookControllerVer2 neckLookCtrl = currentBody.neckLookCtrl; NeckLookCalcVer2 neckLookScript = neckLookCtrl.neckLookScript; NeckTypeStateVer2 param = neckLookScript.neckTypeStates[neckLookCtrl.ptnNo]; angle = new Vector2(rot.x, rot.y); for (int i = neckLookScript.aBones.Length - 1; i > -1; i--) { NeckObjectVer2 bone = neckLookScript.aBones[i]; RotateToAngle(param, i, bone); } }