HelpPTC and FPS problems

Posts 16–24 of 24 · Page 2 of 2
Quote Originally Posted by Flengo View Post


Sleep in that sense will delay each frame by whatever your ms input was.
Not trying to offend but, you don't say xD That's pretty basic. It just freezes the thread for a set amount of time.
Quote Originally Posted by LilGho$t View Post
Not trying to offend but, you don't say xD That's pretty basic. It just freezes the thread for a set amount of time.
Doing as I posted will push the command once and stop
pushing the command once is not enough for no fog hack, when you respawn you will need to push the no fog hack again
Quote Originally Posted by supremejean View Post
Doing as I posted will push the command once and stop
Don't know why you quoted me here lol

Quote Originally Posted by Departure View Post
pushing the command once is not enough for no fog hack, when you respawn you will need to push the no fog hack again
So really for that to work right we need to include in our while loop:
Code:
if(PlayerIsDead){
imAboutToRespawn = true;
}
else{
if(imAboutToRespawn){
imAboutToRespawn = false; // player has already respawned because they're not dead and we know they've died because this was true
if(fog){
ptc("FogEnable 0");
}
}
}
Quote Originally Posted by LilGho$t View Post
Don't know why you quoted me here lol


So really for that to work right we need to include in our while loop:
Code:
if(PlayerIsDead){
imAboutToRespawn = true;
}
else{
if(imAboutToRespawn){
imAboutToRespawn = false; // player has already respawned because they're not dead and we know they've died because this was true
if(fog){
ptc("FogEnable 0");
}
}
}
Thought you were the thread creator lol my bad. but Idk what he means that when you die you need to push it again, I push it once and it works until i deactivate it.
Make a class for PTC and Memoryhacks and it will look like this:

Code:
cNoRecoil.Init((void*)cMisc.dwAdrTbl[18], (void*)"\x90\x90\x90\x90");
cNoFog.Init("FogEnable 0", "FogEnable 1");

while(1)
{
        cNoRecoil.Patch(cMenu.activatedHack[9], 4);
        cNoFog.patchConsoleCommand(cMenu.activatedHack[49]);
}
Without any problems or lagg
thanks to all, guys. fixed!
@LilGho$t
you could but its not needed...

think about this, the reason for the lagging is because the hack is called every time present is called aka every frame, so if you have 90fps thats 90 times the hack was called in second, but if you set the counter to 90 that means the hack is called once per second as opposed to 90 times. I think the user will not even notice if the no fog hack didn't comeback on for 1 second after respawn... so while your theory is correct the logic is not because it would be pointless to do it that way, even calling the push to console once per second is huge performance boost over lets say 90 times per second, and you can do without the extra code you have above because you are actually slowing it down do your code above, instead of just incrementing a value by one every frame you are doing multiple checks with booleans which takes longer to execute which means less performance.
Quote Originally Posted by Departure View Post
@LilGho$t
you could but its not needed...

think about this, the reason for the lagging is because the hack is called every time present is called aka every frame, so if you have 90fps thats 90 times the hack was called in second, but if you set the counter to 90 that means the hack is called once per second as opposed to 90 times. I think the user will not even notice if the no fog hack didn't comeback on for 1 second after respawn... so while your theory is correct the logic is not because it would be pointless to do it that way, even calling the push to console once per second is huge performance boost over lets say 90 times per second, and you can do without the extra code you have above because you are actually slowing it down do your code above, instead of just incrementing a value by one every frame you are doing multiple checks with booleans which takes longer to execute which means less performance.
True, either way, i need to know how to write my hooks and detours before i start making hacks again.
Posts 16–24 of 24 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us