View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jul 28, 2011 14:28 Post subject: Persistent Object - HB Resolution? |
|
|
Hey VirusMan -
On Bioware Forums, Funky or someone - maybe even yourself, mentioned something about you working on a plugin that would resolve the issue of Low Priority Heartbeats , such as spells etc, not firing.
Did anything ever come of this?
Is there going to be a Windows Release?
Pretty Please?????? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Jul 28, 2011 15:12 Post subject: |
|
|
Low priority heartbeats? Spells not firing?
I've never seen or heard about this problem. If you have a test module that can reproduce the problem, please send it.
There was a bug with clock freezing, and it has been fixed with last NWNX Fixes update (Linux only):
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/377/trunk/plugins/fixes _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jul 28, 2011 22:01 Post subject: |
|
|
I may have described the issue in-accurately.
The issue is that large modules suffer from the issue where low priority heartbeats, such as the storm of vengeance spell heartbeat, do not fire on their own, without the use of Pseudo Heartbeats to force the heartbeat to fire.
Perhaps this is linked to the Module Time issue?
Would the AIUpdate hook fix such an issue as I have described? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Jul 28, 2011 23:09 Post subject: |
|
|
Yes, the time freeze fix may also fix these issues. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Fri Jul 29, 2011 0:01 Post subject: |
|
|
Cool
Would the same function you have in the fixes, work in the windows version?
I am just getting IDA installed now again...
If the function implimentation is likely to be the same, I should be able to update the memory locations for windows version (assuming they are labeled in the IDB) |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Fri Jul 29, 2011 2:27 Post subject: |
|
|
Hey Virus.
I have a dll building with no errors.
Can you confirm if this function will work?
Its exactly how it was taken from the linux one, I just dont know whether there is a better hooking function out there.
Code: |
void d_redirect (long from, long to, unsigned char *d_ret_code, long len=0)
{
// enable write to code pages
d_enable_write (from);
// copy orig code stub to our "ret_code"
len = len ? len : sizeof(d_jmp_code)-1; // - trailing 0x00
intlen = len;
memcpy ((void *) d_ret_code, (const void *) from, len);
// make ret code
*(long *)(d_jmp_code + 1) = from + len;
memcpy ((char *) d_ret_code + len, (const void *) d_jmp_code, 6);
// make hook code
*(long *)(d_jmp_code + 1) = to;
memcpy ((void *) from, (const void *) d_jmp_code, 6);
}
|
Do the variables in this function need to be replaced with win32 equivelants?
Do you have a hook function lying around off hand?
The way I am calling this is via.
Code: |
if(fixes.ini_aiUPDATE)
{
d_redirect((unsigned long)CNWSModule__AIUpdate, (unsigned long)CNWSModule__AIUpdate_hook, d_ret_code_mai, 9);
*(dword*)&CNWSModule__AIUpdate_R = (dword)&d_ret_code_mai;
}
|
Im still pretty fresh to c++.
I learn a little, then have a long break, and all that I learn goes out the window. lol
I updated the memory location for the module aiupdate to be 004D1D00 |
|
Back to top |
|
|
|