|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
jonboy999 Newbie cheater Reputation: 0
Joined: 21 Oct 2023 Posts: 20
|
Posted: Thu Jun 27, 2024 11:26 am Post subject: Increase XMM7 only when positive? |
|
|
Hi all, the second value in xmm7 is my upwards velocity, so what i want to do is double this value when the value is positive and if its negative leave it alone.
Currently i can double the second value and it makes me jump higher but because all velocity is being doubled i fall to the ground like instantly, i want to keep that high jump but keep the standard falling velocity the same instead of doubling.
So basically i want to double the second space in xmm7 if its a positive number and if its negative ignore.
Can someone help me create the asm for this as everything i try to compare that second slot doesnt work
thanks
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 146
Joined: 06 Jul 2014 Posts: 4471
|
Posted: Thu Jun 27, 2024 12:28 pm Post subject: |
|
|
I'm guessing it's a float.
Straightforward approach:
Code: | newmem:
sub rsp,10
movups [rsp],xmm7
xorps xmm7,xmm7
ucomiss xmm7,[rsp+4]
jae code
movss xmm7,[rsp+4]
addss xmm7,xmm7
movss [rsp+4],xmm7
code:
movups xmm7,[rsp]
add rsp,10
// original code
...
jmp return | There's also stuff you can do with shufps, but that's kind of hard to keep track of
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
jonboy999 Newbie cheater Reputation: 0
Joined: 21 Oct 2023 Posts: 20
|
Posted: Fri Jun 28, 2024 12:20 pm Post subject: |
|
|
ParkourPenguin wrote: | I'm guessing it's a float.
Straightforward approach:
Code: | newmem:
sub rsp,10
movups [rsp],xmm7
xorps xmm7,xmm7
ucomiss xmm7,[rsp+4]
jae code
movss xmm7,[rsp+4]
addss xmm7,xmm7
movss [rsp+4],xmm7
code:
movups xmm7,[rsp]
add rsp,10
// original code
...
jmp return | There's also stuff you can do with shufps, but that's kind of hard to keep track of |
Thanks mate will give it a try
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|