Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Rainbow Six Vegas 2 FOV and Third Person (HELP STILL NEEDED)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Sat Aug 29, 2015 9:13 am    Post subject: Rainbow Six Vegas 2 FOV and Third Person (HELP STILL NEEDED) Reply with quote

I've been poking around in vegas 2 trying to see if i can modify the FOV amongst other things. However i can only get so far before I run into problems.

I already know how to do the search for the FOV values and how to eliminate the false values that aren't modifiable in any way. The only trouble is assessing the code that modifies it.

Code:

"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]

was the initial first important code. first i modified the [esi+30] directly by writing to a separate variable, then making the fadd or fstp load a float of 90 from said separate variable. FOV changed but now zoom in didn't work properly.
then to check the relevance of the fld i replaced it with:
Code:
mov [newfov],(float)90
  fld dword ptr [newfov]

(obviously i had defined newfov) and that also had the same effect as above.

after a bit of digging round through yet more false values until i found one that didn't loop back into the esi and edi loop, it got me this bit of code
Code:
"R6Vegas2_Game.exe"+317553: 8B CE              -  mov ecx,esi
"R6Vegas2_Game.exe"+317555: FF D2              -  call edx
"R6Vegas2_Game.exe"+317557: 8B 7C 24 10        -  mov edi,[esp+10]
"R6Vegas2_Game.exe"+31755B: 83 C6 48           -  add esi,48
"R6Vegas2_Game.exe"+31755E: B9 16 00 00 00     -  mov ecx,00000016
"R6Vegas2_Game.exe"+317563: F3 A5              - repe  movsd

with the mov ecx,00000016 being the "modifying code".

messing round with the mov ecx,00000016 line itself had varying results on my viewpoint. if set to 8 or 9, it'd do the same behaviour as the initial round of testing with 90 FOV, only at the 51 FOV that the game was in normally (as in keeping it to one FOV level, preventing zooming). below that it'd glitch and at around 15 or so it'd still allow me to zoom fine. i tried tracing and checking the addresses accessed through the memory viewer for this line as well but it yielded little to nothing that was useful or affected anything (no accessed addresses and the trace showed that the ECX was acting like a countdown with the repe movsd code).

At this point i'm confused as to where else to go to find out what influences the FOV past that. I've been looking for the numbers and how the code modifies them but at this point i can't find the base numbers that the code writes to [edi+30] which then gets loaded into [esi+30].

I get the feeling that the zoom in for the FOV happens before anything gets written to [edi+30] and that there are some hardcoded numbers before the zoom process itself.

the only numbers i have been able to ascertain were after [edi+30] had been written in some way, including the [esi+30] (in 16:9 standard FOV is 51 float, ADS zoom is 34, corner lean appears to be around 39 and ACOG zoom appears to be 16 in case any of you want to see for yourself. also the initial valid writable [esi+30] always ends with an 8 on the address for faster filtering). without modifying the code and just freezing the [esi+30] value, the FOV keeps trying to revert back to it's "intended" value.

either way, any ideas on what i might be missing and where i go from here?


Last edited by JJXB on Tue Apr 11, 2017 5:05 pm; edited 3 times in total
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Aug 29, 2015 12:06 pm    Post subject: Reply with quote

Code:
"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]

What about adding something like:
"fadd [fov90]" or something like that between fadd [esi+30] and fstp.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Sat Aug 29, 2015 1:01 pm    Post subject: Reply with quote

deama1234 wrote:
Code:
"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]

What about adding something like:
"fadd [fov90]" or something like that between fadd [esi+30] and fstp.

just tested that now.
with this code:
Code:
  fadd dword ptr [esi+30]
  fadd dword ptr [newfov]
  fstp dword ptr [esi+30]

and [newfov] set at 90, i get a whole lot of graphical pullout. however, manipulating the view then showed my view was high in the sky above my location, as if the camera had been pulled too far out.
chaning newfov to 50 confirmed that i was on the right path there so i changed it to 10 and it changed the FOV in the end while in normal view to 91. going further however i discovered that setting it to a 9 float took it to 89. At this point, best one for standard FPV is with [newfov] set at 09.8 which gets my normal FOV at "90.20000458". only trouble then is that the other views are out of whack.
over the shoulder (used when leaning on walls) ends up coming out at 116 FOV while ACOG (which was around 16 FOV originally) comes out at 56 FOV, which makes the zoom itself useless, even though it's now "working".

so my next idea is to try and first setup a way to read a value from the cheat table as a var to allow me to tweak the FOV on the fly without remodifying the code (would make it easier to find good values for each case pre-modification) then once i have the values i need, modify the code to go for a different [newfov] value per input case (such as 0 for ACOG or 6X scope FOV's, 09.8 for standard and so on).

So what would i have to do in order to get an AA script to read a variable/value from a cheat table? I'd also be using it to implement some way of maybe allowing people to change it if i make it a trainer as well so it could work both ways Smile

So TL;DR? Progress but still work to be done.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Aug 29, 2015 1:08 pm    Post subject: Reply with quote

So, you just want to change your default FOV, no other ones?
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Sat Aug 29, 2015 1:19 pm    Post subject: Reply with quote

deama1234 wrote:
So, you just want to change your default FOV, no other ones?

Not quite. I still want to be able to have 90 standard FOV but be able to have the lower FOV's available that get applied to zoom levels, so as to make sure that the ACOG, 6X scope and Lean Views aren't all screwy to the point of unplayability. because what use is a zoom function with a scope when it hardly allows you to see in the distance?
That and when your external view is so stretched out that you can't see shit, a lower FOV there might be wise.

anyway what i have managed to do *so far* since typing the last post was stopping the script from defining [newfov] and instead have [newfov] in my cheat table and it seems to allow on the fly modification fine so far. I'm not sure this is an optimal solution but it's worth trying.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Aug 29, 2015 1:31 pm    Post subject: Reply with quote

You could see what accesses one of the instructions then find out which one is the FOV you use without any zooms; then isolate it from the rest. Then modify it to whatever you want, then if the script detects anything other than the "normal FOV", make it inject a fake FOV.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Wed Sep 02, 2015 7:32 am    Post subject: Reply with quote

sorry for the slow reply, was playing other things and real life got in the way of doing other things.

coming back with a fresh mind on it though, before i can check for the value, i need to be able to monitor the value. i've already alloc'd and registered the symbols to store the value for easy viewing in the cheat table. but i can't seem to get the [esi+30] into the [esi30] memory (esi30 being the registered symbol). i tried:
Code:
push [esi+30]
pop [esi30]

but that caused the game to error out. every time i try to do the trace on the fadd instruction, the value written somehow appears to be (dword)0. thoughts?

Edit:
i've just tried checking the edi+30 value instead because that's what gets passed to esi+30 and i can reliably detect that value in a cmp.

Edit 2:
okay, i'm not sure how much farther i can get without posting the entire script with it so i'll post the entire AA script here and describe what is and isn't possible yet.

Code:
{ Game   : R6Vegas2_Game.exe
  Version: ??
  Date   : 2015-08-15
  Author : JJXB

  This is a WIP FOV Modification Script
}

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
 
aobscanmodule(FOV2,R6Vegas2_Game.exe,D8 46 30 D9 5E 30 8B 4F) // should be unique
alloc(newmem,$1000)
alloc(newfov,16)

label(code)
label(fovcmp)
label(fovcmp2)
label(fovchange)
label(fovchange2)
label(fovchange3)
label(fovchange4)
label(return)

registersymbol(newfov)

newmem:

fovcmp: //first check
cmp [edi+30],(float)51
jg fovchange3
je fovchange2
jmp fovcmp2

fovcmp2:
cmp [edi+30],(float)49
jg fovchange3
jl fovchange

fovchange: //if anything below 51
mov [newfov],(float)0
jmp code

fovchange2: //if 51 - normal
mov [newfov],(float)18
jmp code

fovchange3: //if 51 - normal
mov [newfov],(float)6.995
jmp code

fovchange4:
//incase i need to add anything
jmp code

code:
  fadd dword ptr [esi+30] //fadd dword ptr [esi+30]
  fadd dword ptr [newfov]
  fstp dword ptr [esi+30]
  mov [newfov],(float)0
  jmp return

FOV2:
  jmp fovcmp
  nop
return:
registersymbol(FOV2)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
FOV2:
  db D8 46 30 D9 5E 30

unregistersymbol(FOV2)
unregistersymbol(newfov)
dealloc(newmem)
dealloc(newfov)

{
// ORIGINAL CODE - INJECTION POINT: "R6Vegas2_Game.exe"+31F9BB

"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
// ---------- INJECTING HERE ----------
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]
// ---------- DONE INJECTING  ----------
"R6Vegas2_Game.exe"+31F9C1: 8B 4F 4C              -  mov ecx,[edi+4C]
}


youtu.be/ko1cA9de2FE - Video Example of this Version of the script (can't post URL's yet)
I found out that sprinting changes the fov higher than 51 (61.XXX to be more precise) so i was trying to work detection of that into it but as soon as i did, i started getting weird artefacts of FOV difference. (detecting that edi+30 was 51 then using a je to go to one FOV modifier but then using a jg to branch if it was higher than 51 caused massive changes that lead me to believe that there's more going on).
this meant that it was difficult to nail down how i could get a precise 90 FOV for standard view.

in memory viewer the two instructions that are pertinent to finding the addresses that contain the FOV's in the first place are
Code:
"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]

since edi and esi +30 variants contain the same values at the end of a normal non-edited process (e.g. 51 when not zoomed, crouched or anything else). for editing, the esi+30 will always end in a 98 when checking accessed addresses, otherwise, all the addresses contain the same loaded value. edi+30 i haven't been able to find an editable address but regardless they all seem to contain the same value that then gets loaded into esi+30

I'll be continuing to work on this but i will also be posting this to PCGW Forums so they might be able to make something of what i have found thus far since i know V2's FOV has been something of a thing that people take issue with and the only other way they've dealt with it is faking an ultrawide monitor aspect ratio with custom resolutions.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Sat Sep 12, 2015 10:40 am    Post subject: Reply with quote

Okay, something i've done with it got it to stop acting strange with some of the FOV's. Still ain't perfect but looks like the detection is at least half kicking in now as it should.

Code:
 { Game   : R6Vegas2_Game.exe
  Version: ??
  Date   : 2015-08-15
  Author : JJXB

  This is a WIP FOV Modification Script
}

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

aobscanmodule(FOV2,R6Vegas2_Game.exe,D8 46 30 D9 5E 30 8B 4F) // should be unique
alloc(newmem,$1000)
alloc(newfov,16)
alloc(existfov,16)

label(code)
label(fovcmp)
label(fovcmp2)
label(fovchange)
label(fovchange2)
label(fovchange3)
label(fovchange4)
label(return)

registersymbol(newfov)
registersymbol(existfov)

newmem:

fovcmp: //first check
cmp [edi+30],(float)51
jg fovchange3
je fovchange3
jmp fovcmp2

fovcmp2:
cmp [edi+30],(float)49
jg fovchange3
jl fovchange

fovchange: //if anything below 51
mov [newfov],(float)0
jmp code

fovchange2: //if 49-50 - crouched normal
mov [newfov],(float)11.10
jmp code

fovchange3: //if 51 - normal
mov [newfov],(float)9.8
jmp code

fovchange4:
//incase i need to add anything
jmp code

code:
push [edi+30]
pop [existfov]
  fadd dword ptr [esi+30] //fadd dword ptr [esi+30]
  fadd dword ptr [newfov]
  fstp dword ptr [esi+30]
  mov [newfov],(float)0
  jmp return

FOV2:
  jmp fovcmp
  nop
return:
registersymbol(FOV2)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
FOV2:
  db D8 46 30 D9 5E 30

unregistersymbol(FOV2)
unregistersymbol(newfov)
unregistersymbol(existfov)
dealloc(newmem)
dealloc(newfov)
dealloc(existfov)
{
// ORIGINAL CODE - INJECTION POINT: "R6Vegas2_Game.exe"+31F9BB

"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
// ---------- INJECTING HERE ----------
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]
// ---------- DONE INJECTING  ----------
"R6Vegas2_Game.exe"+31F9C1: 8B 4F 4C              -  mov ecx,[edi+4C]
}


i took a bit of time away from it to try and refresh my head on this stuff and i think it does work as best as i can think of for the moment. also use existfov as a memory address in a cheat table with this and you'll see how esi+30 comes out with values.

Bonus for anyone interested in how to measure the base FOV:
Code:
{ Game   : R6Vegas2_Game.exe
  Version:
  Date   : 2015-08-15
  Author : JJXB

  This script does blah blah blah
}

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

 
 
aobscanmodule(FOV2,R6Vegas2_Game.exe,D8 46 30 D9 5E 30 8B 4F) // should be unique
alloc(newmem,$1000)
alloc(newfov,64)
alloc(existfov,64)

label(code)
label(fovchange)
label(return)

registersymbol(newfov)
registersymbol(existfov)

newmem:

fovchange:
push [edi+30]
pop [existfov]
nop //mov [newfov],(float)09.8
jmp code

code:
  fadd dword ptr [esi+30] //fadd dword ptr [esi+30]
  fadd dword ptr [newfov]
  fstp dword ptr [esi+30]
  jmp return

FOV2:
  jmp fovchange
  nop
return:
registersymbol(FOV2)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
FOV2:
  db D8 46 30 D9 5E 30

unregistersymbol(FOV2)
unregistersymbol(newfov)
unregistersymbol(existfov)
dealloc(newmem)
dealloc(newfov)
dealloc(existfov)

{
// ORIGINAL CODE - INJECTION POINT: "R6Vegas2_Game.exe"+31F9BB

"R6Vegas2_Game.exe"+31F9B6: D9 47 30              -  fld dword ptr [edi+30]
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)
// ---------- INJECTING HERE ----------
"R6Vegas2_Game.exe"+31F9BB: D8 46 30              -  fadd dword ptr [esi+30]
"R6Vegas2_Game.exe"+31F9BE: D9 5E 30              -  fstp dword ptr [esi+30]
// ---------- DONE INJECTING  ----------
}

stick both existfov and newfov into the cheat table as addresses, activate this then existfov will spit out the base fov. however for some reason modifying newfov modifies existfov too, making me think that the process has more and more to do with fmul st(0),st(1)
as well since it seems like it's modifying edi+30 when i'm putting the fadd [newfov] after fadd [esi+30]. Can anyone suggest how i'd monitor the values of st 0 and 1 at all or what might be going on with it in it's current form? i'm wracking my brain trying to get this workable.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Thu Sep 17, 2015 3:13 pm    Post subject: Reply with quote

Okay, looking at it, the one function i have fundamentally no understanding as to it's contribution is
Code:
"R6Vegas2_Game.exe"+31F9B9: D8 C9                 -  fmul st(0),st(1)

and try as i might, i can't get anything intelligible out of that because i can't find what for the life of me is on those stacks in terms of values. the only other *things* i've found since that have been:

FPU Registers:
The Extended FPU Register between fmul and the fstp esi command contains the base FOV. so i can only assume that either fld edi is loading it into extended FPU or something else is. i say that because of something else:

ESI and EDI Separation:
Fucking non-existent. it seems that some addresses get re-used for both ESI and EDI in looping instructions. meaning that it seems like a looping cycle of resets to the value it sees it "should" be.

EDI and Pointers:
it doesn't straight up write float values to EDI bar 51. what it does is put a pointer to something else when another FOV is needed (such as zooming). I tried putting in some of the pointer addresses to find out what it points to but that leads to nothing but useless areas of memory.

using the address of the FOV that gets "written" to as a pointer just points to the useless memoryspace. using the address of the useless memoryspace as a pointer gets me nothing of value either.

fmul:
noping the fmul instruction completely messes up the FOV. causing major glitches, indicating that the multiplication is a vital component in determining FOV. what is not so clear is *how* and what values it is processing then storing in st(1). because from what i can tell, the st(1) value is then what goes into [esi+30]. i have tried looking through XMM and FPU Registers (which is how i found the FPU tidbit) but apart from base FOV being stored in FPU Xtend, no useful info is there from what i can tell. and all of the floats in xmm register tend to stay the same:

Code:
xmm0:0.50 - 0.00 - 0.00 - 0.00
xmm1:1.00 - 0.00 - 0.00 - 0.00
xmm2:2.00 - 0.00 - 0.00 - 0.00
xmm3:2.00 - 0.00 - 0.00 - 0.00
xmm4:3.00 - 0.00 - 0.00 - 0.00
xmm5:0.50 - 0.00 - 0.00 - 0.00
xmm6:0.00 - 0.00 - 0.00 - -0.61
xmm7:0.00 - 0.00 - 68521467904.00 - 0.76


either way, i'm getting to my wit's end with this because it seems like i can't get all the information i would need and how esi and edi are determined because of how many esi and edi addresses are written (4).
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Tue Sep 22, 2015 10:00 am    Post subject: Reply with quote

bumping in the hopes someone can help me shed more light on how this works than i've already done.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Wed Oct 07, 2015 1:15 pm    Post subject: Reply with quote

Little to no progress on the FOV front i'm afraid. i have managed to find out more general camera variables however. trouble with it is that i can't seem to get the stuff to stick if i change things because the game's code that manages any of the camera variables (including FOV it seems) loops, writes and reverts any changes in a matter of milliseconds.
So i figured it'd be best if i uploaded what i have in a cheat table as is and let others look at the ct to see if they can catch anything i couldn't. I'll still look at doing things with this as i want to learn more and do more but i am seriously needing some help with figuring out how the numbers get fed into the loop and how I can influence those numbers before or after they enter said loop in a reliable fashion.



R6Vegas2_Game.CT
 Description:
All I know of V2's camerawork as of 07/10/2015

Download
 Filename:  R6Vegas2_Game.CT
 Filesize:  403.4 KB
 Downloaded:  1355 Time(s)

Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Fri Oct 23, 2015 2:05 pm    Post subject: Reply with quote

As the thread title says, PROGRESS!
went back to the drawing board and finagled some way of having a readily modifiable FOV with caveats.
Current process is this:
Compare [EDI+30],49.725
if equal or greater , Compare [EDI+30],62
if less or equal, run the code to add [FOVVALAdd] into the process (with adjustable FOVVALADD, if zero it won't add anything)
in the event that first check is less or second check is greater, it just executes standard FOV routine so it only changes anything between 49.725 and 62 (49.725 being crouching FOV and 61.something being sprint FOV).

Very limited use case thus far but it catches all the instances that i'd want to change the FOV (Standing, Crouching, Sprinting Etc) while leaving alone more precise aiming modes. Still has weird anomalys but i will upload the .CT file for your examination/criticism (kind of messy and stuff but progress is progress, right?).
i'm gonna build up a beta Trainer for this to enable the code change that also allows for changing the amount the FOV is modified and post it up later.



R6Vegas2_Game.CT
 Description:
Current version. Working FOV code is under "Working Scripts"

Download
 Filename:  R6Vegas2_Game.CT
 Filesize:  427.78 KB
 Downloaded:  1432 Time(s)

Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Mon Nov 23, 2015 11:15 am    Post subject: Reply with quote

not had time to work on it the past month or so due to various reasons unfortunately. plus most of my CT files have gone kaput because i've lost them in a laptop move (massive upgrade). however the fact i uploaded my last bout of progress on this did help me make sure to get it back in this case. for all my other personal projects i have to start from scratch but i have no real issue in doing so because where would i challenge myself otherwise? Razz

i do plan on doing more work at some point but at the second i gotta tweak vegas 2 since now on my new laptop it runs at 160+ fps at 1920x1080. that and i need to break my FO: new vegas addiction Very Happy
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Wed Nov 25, 2015 4:22 am    Post subject: Reply with quote

You should do floating point comparisons with the FPU, otherwise you can have "weird" things happen.
Back to top
View user's profile Send private message
JJXB
Newbie cheater
Reputation: 0

Joined: 28 Aug 2015
Posts: 20

PostPosted: Mon Nov 30, 2015 11:26 am    Post subject: Reply with quote

how would you go about doing AA code for FPU comparisons?

I know that the fld dword ptr [edi+30] tends to load the FOV itself into the FPU Extended Register from [edi+30] but the edi address tends to vary based on the current viewmode (zoomed, not zoomed etc).

my script currently modifies by first comparing what [esi+30] is then if it's between 49 and 62 float, doing a modified routine of doing the fld then an fadd with a custom var(whatever number is in FOVADDVal as a value) before moving onto the fmul. if it's below 49 or above 62 then it just only does the fld then fmul like standard.

when it comes down the FOVADDVal custom var, i made it flexible enough that i could manipulate it by adding an entry to the table to add to it on the fly and test. but if i want to define it in the script i only have to write a value to add before the checks for the base FOV kick in.

download my CT and have a look yourself if you think i might be doing something wrong for sure though. it's why i made it available to d/l here, to make sure others could check over it without any trouble.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites