public void BuildFixedRelXMPFile(string sampleXMPFilename) { int curIdx = 1; FVector relativePos = new FVector(0, 0, 0); FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Yaw = 90.0f; XMPFile save_file = new XMPFile(); save_file.LoadXML(sampleXMPFilename); int key_offset = 0;// keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory1) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } //FRotator newRot = new FRotator(0, 0, 0); //newRot.Pitch = -jfInfo0.rotation.Roll; //newRot.Yaw = jfInfo0.rotation.Yaw + 90.0; //newRot.Roll = 0; //double[] mt = BuildRotationMatrix(newRot); double[] mt = GetMtx(jfInfo0.rotationString, 3); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X; newPos.Y = jfInfo0.position.Y; newPos.Z = jfInfo0.position.Z; save_file.SetRotation(mt); save_file.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } curIdx = 2; //FVector relativePos = new FVector(0, 0, 0); //FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Yaw = -90.0; XMPFile save_file_2 = new XMPFile(); save_file_2.LoadXML(sampleXMPFilename); //key_offset = keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory2) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } //FRotator newRot = new FRotator(0, 0, 0); //newRot.Pitch = jfInfo0.rotation.Roll ; //newRot.Yaw = jfInfo0.rotation.Yaw - 90.0; //newRot.Roll = 0; //double[] mt = BuildRotationMatrix(newRot); double[] mt = GetMtx(jfInfo0.rotationString, 1); //double[] mt = jfInfo0.rotation.GetRightDirMtx(); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X; newPos.Y = jfInfo0.position.Y; newPos.Z = jfInfo0.position.Z; save_file_2.SetRotation(mt); save_file_2.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file_2.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } curIdx = 3; //FVector relativePos = new FVector(0, 0, 0); //FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Yaw = 180; XMPFile save_file_3 = new XMPFile(); save_file_3.LoadXML(sampleXMPFilename); //int key_offset = keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory3) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } //FRotator newRot = new FRotator(0, 0, 0); //newRot.Pitch = -jfInfo0.rotation.Pitch; //newRot.Yaw = jfInfo0.rotation.Yaw + 180; //newRot.Roll = 0; double[] mt = GetMtx(jfInfo0.rotationString, 2); //double[] mt = BuildRotationMatrix(newRot); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X; newPos.Y = jfInfo0.position.Y; newPos.Z = jfInfo0.position.Z; save_file_3.SetRotation(mt); save_file_3.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file_3.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } }
public void BuildRelXMPFile() { if (!isXMPSetting[0]) { return; } if (isXMPSetting[1]) { int curIdx = 1; FVector relativePos = new FVector(0, 0, 0); relativePos.X = relPostion[curIdx].X - relPostion[0].X; relativePos.Y = relPostion[curIdx].Y - relPostion[0].Y; relativePos.Z = relPostion[curIdx].Z - relPostion[0].Z; FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Pitch = relRotator[curIdx].Pitch - relRotator[0].Pitch; relativeRotator.Yaw = relRotator[curIdx].Yaw - relRotator[0].Yaw; relativeRotator.Roll = relRotator[curIdx].Roll - relRotator[0].Roll; XMPFile save_file = new XMPFile(); save_file.LoadXML(relativeXMPFilename[curIdx]); int key_offset = keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory1) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } FRotator newRot = new FRotator(0, 0, 0); newRot.Pitch = jfInfo0.rotation.Pitch + relativeRotator.Pitch; newRot.Yaw = jfInfo0.rotation.Yaw + relativeRotator.Yaw; newRot.Roll = jfInfo0.rotation.Roll + relativeRotator.Roll; double[] mt = BuildRotationMatrix(newRot); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X + relativePos.X; newPos.Y = jfInfo0.position.Y + relativePos.Y; newPos.Z = jfInfo0.position.Z + relativePos.Z; save_file.SetRotation(mt); save_file.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } } if (isXMPSetting[2]) { int curIdx = 2; FVector relativePos = new FVector(0, 0, 0); relativePos.X = relPostion[curIdx].X - relPostion[0].X; relativePos.Y = relPostion[curIdx].Y - relPostion[0].Y; relativePos.Z = relPostion[curIdx].Z - relPostion[0].Z; FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Pitch = relRotator[curIdx].Pitch - relRotator[0].Pitch; relativeRotator.Yaw = relRotator[curIdx].Yaw - relRotator[0].Yaw; relativeRotator.Roll = relRotator[curIdx].Roll - relRotator[0].Roll; XMPFile save_file = new XMPFile(); save_file.LoadXML(relativeXMPFilename[curIdx]); int key_offset = keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory2) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } FRotator newRot = new FRotator(0, 0, 0); newRot.Pitch = jfInfo0.rotation.Pitch + relativeRotator.Pitch; newRot.Yaw = jfInfo0.rotation.Yaw + relativeRotator.Yaw; newRot.Roll = jfInfo0.rotation.Roll + relativeRotator.Roll; double[] mt = BuildRotationMatrix(newRot); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X + relativePos.X; newPos.Y = jfInfo0.position.Y + relativePos.Y; newPos.Z = jfInfo0.position.Z + relativePos.Z; save_file.SetRotation(mt); save_file.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } } if (isXMPSetting[3]) { int curIdx = 3; FVector relativePos = new FVector(0, 0, 0); relativePos.X = relPostion[curIdx].X - relPostion[0].X; relativePos.Y = relPostion[curIdx].Y - relPostion[0].Y; relativePos.Z = relPostion[curIdx].Z - relPostion[0].Z; FRotator relativeRotator = new FRotator(0, 0, 0); relativeRotator.Pitch = relRotator[curIdx].Pitch - relRotator[0].Pitch; relativeRotator.Yaw = relRotator[curIdx].Yaw - relRotator[0].Yaw; relativeRotator.Roll = relRotator[curIdx].Roll - relRotator[0].Roll; XMPFile save_file = new XMPFile(); save_file.LoadXML(relativeXMPFilename[curIdx]); int key_offset = keyIndex[curIdx] - keyIndex[0]; foreach (var node in xmpFileDirectory3) { int idx = node.Key; jpgFileInfo jfInfo = node.Value; int idx0 = idx - key_offset; if (!xmpFileDirectory0.ContainsKey(idx0)) { continue; } jpgFileInfo jfInfo0 = xmpFileDirectory0[idx0]; if (!jfInfo0.isXMP) { continue; } FRotator newRot = new FRotator(0, 0, 0); newRot.Pitch = jfInfo0.rotation.Pitch + relativeRotator.Pitch; newRot.Yaw = jfInfo0.rotation.Yaw + relativeRotator.Yaw; newRot.Roll = jfInfo0.rotation.Roll + relativeRotator.Roll; double[] mt = BuildRotationMatrix(newRot); FVector newPos = new FVector(0, 0, 0); newPos.X = jfInfo0.position.X + relativePos.X; newPos.Y = jfInfo0.position.Y + relativePos.Y; newPos.Z = jfInfo0.position.Z + relativePos.Z; save_file.SetRotation(mt); save_file.SetPosition(newPos.X, newPos.Y, newPos.Z); string saveXMPFilename = Path.ChangeExtension(jfInfo.filename, "xmp"); save_file.SaveXML(saveXMPFilename); Program.AddLog("SaveXML: " + saveXMPFilename); } } }
/// <summary> /// Set the rotation of the component relative to its parent /// </summary> /// <param name="newRotation">New rotation of the component relative to its parent</param> /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param> /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object). /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts).</param> public void SetRelativeRotation(FRotator newRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None) { Native_USceneComponent.SetRelativeRotation(this.Address, ref newRotation, sweep, (int)teleport); }
public bool MoveComponent(FVector delta, FRotator newRotation, bool sweep, EMoveComponentFlags moveFlags = EMoveComponentFlags.NoFlags, ETeleportType teleport = ETeleportType.None) { return(Native_USceneComponent.MoveComponentRotNoHit(this.Address, ref delta, ref newRotation, sweep, (int)moveFlags, (int)teleport)); }
/// <summary> /// Adds a delta to the rotation of the component in world space. /// </summary> /// <param name="deltaRotation">Change in rotation in world space for the component.</param> /// <param name="sweep">Whether we sweep to the destination (currently not supported for rotation).</param> /// <param name="teleport">Whether we teleport the physics state (if physics collision is enabled for this object). /// If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). /// If false, physics velocity is updated based on the change in position (affecting ragdoll parts). /// If CCD is on and not teleporting, this will affect objects along the entire sweep volume.</param> public void AddWorldRotation(FRotator deltaRotation, bool sweep = false, ETeleportType teleport = ETeleportType.None) { Native_USceneComponent.AddWorldRotation(this.Address, ref deltaRotation, sweep, (int)teleport); }
public static void QQloop() { while (true) { QQChat.Update(); QQctor localplayer = QQctor.GetLocalPlayer(); #region Weapon Mods if (QQSetting.InfiniteAmmo || QQSetting.NoRecoil || QQSetting.NoSpread || QQSetting.MagicBullets) { AWeaponProcessor WeaponProcessor = localplayer.WeaponProcessor; TArray <ATslWeapon> EquippedWeapons = WeaponProcessor.EquippedWeapons; for (int nItemSlot = 0; nItemSlot < 3; nItemSlot++) { var Weapon = EquippedWeapons.ReadValue(nItemSlot, true); Weapon.BasePointer = M.Read <IntPtr>(EquippedWeapons[nItemSlot]); if (Weapon.BasePointer == IntPtr.Zero) { continue; } FTrajectoryWeaponData TrajectoryConfig = Weapon.TrajectoryConfig; FWeaponGunData WeaponGunConfig = Weapon.WeaponGunConfig; FWeaponData WeaponConfig = Weapon.WeaponConfig; FRecoilInfo RecoilInfo = Weapon.RecoilInfo; FWeaponGunAnim WeaponGunAnim = Weapon.WeaponGunAnim; FWeaponDeviationData WeaponDeviationConfig = Weapon.WeaponDeviationConfig; if (QQSetting.InfiniteAmmo) { Weapon.SetAmmoInClip(999); } if (QQSetting.MagicBullets) { WeaponGunConfig.TimeBetweenShots = 0.03f; } if (QQSetting.FullAuto) { Weapon.SetFiringMode(0, EFiringMode.FullAuto); } if (QQSetting.NoMuzzle) { WeaponGunAnim.CharacterFire = IntPtr.Zero; } if (QQSetting.NoSway) { WeaponConfig.SwayModifier_Crouch = 0; WeaponConfig.SwayModifier_Movement = 0; WeaponConfig.SwayModifier_Pitch = 0; WeaponConfig.SwayModifier_Prone = 0; WeaponConfig.SwayModifier_Stand = 0; WeaponConfig.SwayModifier_YawOffset = 0; } if (QQSetting.InstantHit) { TrajectoryConfig.InitialSpeed = float.MaxValue; Weapon.SetBulletGravity(0f); } if (QQSetting.NoRecoil) { // TRAJECTORY CONFIG TrajectoryConfig.RecoilPatternScale = 0; TrajectoryConfig.RecoilRecoverySpeed = 0; TrajectoryConfig.RecoilSpeed = 0; // RECOIL INFO RecoilInfo.VerticalRecoilMin = 0; RecoilInfo.VerticalRecoilMax = 0; RecoilInfo.RecoilValue_Climb = 0; RecoilInfo.RecoilValue_Fall = 0; RecoilInfo.RecoilModifier_Stand = 0; RecoilInfo.RecoilModifier_Crouch = 0; RecoilInfo.RecoilModifier_Prone = 0; RecoilInfo.RecoilSpeed_Horizontal = 0; RecoilInfo.RecoilSpeed_Vertical = 0; RecoilInfo.RecoverySpeed_Vertical = 0; RecoilInfo.VerticalRecoveryModifier = 0; // WEAPON GUN ANIM WeaponGunAnim.ShotCameraShake = IntPtr.Zero; WeaponGunAnim.ShotCameraShakeADS = IntPtr.Zero; WeaponGunAnim.ShotCameraShakeIronsight = IntPtr.Zero; } if (QQSetting.NoSpread) { // TRAJECTORY CONFIG TrajectoryConfig.WeaponSpread = 0; TrajectoryConfig.AimingSpreadModifier = 0; TrajectoryConfig.FiringSpreadBase = 0; TrajectoryConfig.ProneRecoveryTime = 0; TrajectoryConfig.ScopingSpreadModifier = 0; // WEAPON GUN CONFIG WeaponGunConfig.FiringBulletsSpread = 0; // WEAPON DEVIATION CONFIG WeaponDeviationConfig.DeviationBase = 0; WeaponDeviationConfig.DeviationBaseADS = 0; WeaponDeviationConfig.DeviationBaseAim = 0; WeaponDeviationConfig.DeviationMax = 0; WeaponDeviationConfig.DeviationMaxMove = 0; WeaponDeviationConfig.DeviationMinMove = 0; WeaponDeviationConfig.DeviationMoveMaxReferenceVelocity = 0; WeaponDeviationConfig.DeviationMoveMinReferenceVelocity = 0; WeaponDeviationConfig.DeviationMoveMultiplier = 0; WeaponDeviationConfig.DeviationRecoilGain = 0; WeaponDeviationConfig.DeviationRecoilGainADS = 0; WeaponDeviationConfig.DeviationRecoilGainAim = 0; WeaponDeviationConfig.DeviationStanceCrouch = 0; WeaponDeviationConfig.DeviationStanceJump = 0; WeaponDeviationConfig.DeviationStanceProne = 0; WeaponDeviationConfig.DeviationStanceStand = 0; // ATslWeapon Weapon.SetRecoilSpreadScale(0f); Weapon.SetRunSpread(0f); Weapon.SetWalkSpread(0f); Weapon.SetJumpSpread(0f); } // WRITE WEAPON INFORMATION Weapon.WriteStruct(RecoilInfo); Weapon.WriteStruct(TrajectoryConfig); Weapon.WriteStruct(WeaponGunConfig); Weapon.WriteStruct(WeaponGunAnim); Weapon.WriteStruct(WeaponDeviationConfig); } } #endregion #region Mass TP if (QQSetting.MassTeleport) { var location = localplayer.RootComponent.RelativeLocation; location.X += 100; location.Y += 100; location.Z += 50; foreach (var player in G.Players.ToList()) { if ((location - player.Location).Length <= 10000) { USceneComponent.SetLocation(player.pRootComponent, location); } } } #endregion #region Miscelanneous if (QQSetting.Flying) { M.Write <byte>((byte)EMovementMode.MOVE_Flying, localplayer.pCharacterMovement + 0x01B4); // MovementMode } #endregion #region Aimbot if (QQSetting.Aimbot) { //Console.WriteLine("AitBot Entry"); var myplayercontroller = G.OwningGameInstance.LocalPlayer.PlayerController; var vecLocalEyeLocation = myplayercontroller.PlayerCameraManager.CameraCache.POV.Location; var angLocalAngles = myplayercontroller.ControlRotation; float flFov = 90f; FRotator flBestAngDelta = new FRotator(); bool bFoundTarget = false; foreach (var Player in G.Players.ToList()) { var vecTargetCenterOfMass = Player.Location; switch (Player.CharacterMovement.Stance) { case EStanceMode.STANCE_Stand: vecTargetCenterOfMass.Z += 30; break; case EStanceMode.STANCE_Crouch: vecTargetCenterOfMass.Z += 10; break; case EStanceMode.STANCE_Prone: vecTargetCenterOfMass.Z -= 15; break; } var delta = vecTargetCenterOfMass - vecLocalEyeLocation; var angDelta = (delta.ToFRotator() - angLocalAngles).Clamp(); if (angDelta.Length <= flFov) { flFov = (float)angDelta.Length; flBestAngDelta = angDelta; bFoundTarget = true; } } // TODO: Keyboard Hook //if (bFoundTarget && (Win32.GetAsyncKeyState(Keys.XButton1) & 0x8000) != 0) // ADD HOLD KEY OR WHATEVER if (bFoundTarget && (Win32.GetAsyncKeyState(Keys.RButton) & 0x8000) != 0) // ADD HOLD KEY OR WHATEVER { M.WriteS <FRotator>(angLocalAngles + flBestAngDelta, G.OwningGameInstance.LocalPlayer.pPlayerController + 0x03C0); } } #endregion // Increase for speed, decrease for performance Thread.Sleep(5); } }
public FRotationMatrix(FRotator rot) : base(rot, new FVector()) { }