Raised This Month: $51 Target: $400
 12% 

[L4D2] Ladder Rambos -- Shoot from ladders!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
epzminion
AlliedModders Donor
Join Date: Jan 2011
Old 06-16-2019 , 03:13   Re: [L4D2] Ladder Rambos -- Shoot from ladders!
Reply With Quote #11

Quote:
Originally Posted by spumer View Post
You can try recompile with https://github.com/spumer/Left4Fix/b...rhelpers.h#L61
My ProtectMemory version take into account multiple memory pages.
This would also crash in this case because it isn't taking into account the offset when it calls ProtectMemory in ApplyPatch.

You would need this change also to make the page(s) at the patch location writable:
Code:
inline void ApplyPatch(void *address, int offset, const patch_t *patch, patch_t *restore)
{
	unsigned char *addr = (unsigned char *)address + offset;
	ProtectMemory((void *)addr, 20, PAGE_EXECUTE_READWRITE);

Last edited by epzminion; 06-16-2019 at 03:18.
epzminion is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode