View Single Post
dcx2
Senior Member
Join Date: Sep 2011
Old 07-16-2013 , 18:55   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #529

I have the exact same problem disawar1 has. I need to remove L4D_OnGetScriptValueInt from my game data by commenting out the windows signature, and then everything runs fine. For safety I also commented out L4D_OnGetScriptValueString and L4D_OnGetScriptValueFloat.

Once I did that to the latest gamedata, I have no problems.

EDIT:

a-ha, I think I have figured out the problem. The Linux function is significantly longer than the Windows function that supposedly matches that sig. But when building Windows binary, the compiler must have separated the Linux function into a nested call. The Windows sigs match the "inner" of the calls.

I think these sigs work. At least, I'm not crashing anymore. Don't laugh, I really needed this many bytes to get something unique...GetScriptInt and GetScriptFloat are almost identical except for the function call offsets (which need wild cards), and one lone byte just before the end of the function. Update these parts of your gamedata

PHP Code:
            /*
             * CDirector::GetScriptValue(const char*, int)
             */
            
"CDirector_GetScriptValueInt"
            
{
                
"library"  "server"
                "linux"    "@_ZN9CDirector14GetScriptValueEPKci"
                "windows"  "\x55\x8B\xEC\x8B\x81\x2A\x2A\x2A\x2A\x83\xEC\x10\x83\xF8\xFF\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x8B\x45\x2A\x8B"
                
/* 55 8B EC 8B 81 ? ? ? ? 83 EC 10 83 F8 FF ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 8B 45 ? 8B */
            
}
            
            
/*
             * CDirector::GetScriptValue(const char*, float)
             */
            
"CDirector_GetScriptValueFloat"
            
{
                
"library"  "server"
                "linux"    "@_ZN9CDirector14GetScriptValueEPKcf"
                "windows"  "\x55\x8B\xEC\x8B\x81\x2A\x2A\x2A\x2A\x83\xEC\x10\x83\xF8\xFF\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xD9"
                
/* 55 8B EC 8B 81 ? ? ? ? 83 EC 10 83 F8 FF ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? D9 */
            

__________________

Last edited by dcx2; 07-16-2013 at 23:01.
dcx2 is offline