AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do you patch your hl1.dll to increase the precache limit? (https://forums.alliedmods.net/showthread.php?t=137476)

solidjake 09-05-2010 20:36

How do you patch your hl1.dll to increase the precache limit?
 
Basically I need some help. You can edit hl.dll to make the precache limit higher. You know, when you start a map and you get
Code:

Host_Error: PF_precache_model_I: Model 'randommodehere' failed to precache because the item count is over the 512 limit.
I know in hexedit you can go into the DLL, find the string that corresponds to the precache limit and alter it to make it higher. This is where I have the dilemma, the string that corresponds to it is 81 FF FF 00 (or 01) where FF 00 (or 01) is 511 in reverse byte order. I'm not sure what I should alter this to to make it higher. Thanks

solidjake 09-06-2010 23:06

Re: How do you patch your hl1.dll to increase the precache limit?
 
The DLL is actually sw.dll

jim_yang 09-06-2010 23:54

Re: How do you patch your hl1.dll to increase the precache limit?
 
That's not so easy as you imagine.
You demand as long as satisfying the following :
1. There is no array (related to precache stuff) that declared using this hardcode number 512
2. make sure the client's dll can precache more than 512 and you don't need to modify client's dll
Edit:
right after this post, I found that at least one array associated with this,
it contains the model index and its max size is 512

solidjake 09-07-2010 16:59

Re: How do you patch your hl1.dll to increase the precache limit?
 
I'm referring to
Quote:

Originally Posted by morfin (Post 957008)
You can patch your engine.dll with hex editor(search something like this: 81FFFF01 where FF01 is number 511 in hex with reversed byte order)and server will precache more

Where a moderator here said it worked.

Arkshine 09-07-2010 17:03

Re: How do you patch your hl1.dll to increase the precache limit?
 
Forget that, it's not that easy he said. The way it is I don't think you can change it.

solidjake 09-07-2010 17:04

Re: How do you patch your hl1.dll to increase the precache limit?
 
Didn't you try it and said it worked but the client had problems precaching? That would mean that singleplayer could work

solidjake 09-08-2010 21:16

Re: How do you patch your hl1.dll to increase the precache limit?
 
Even if it is a lost cause I would still like to know how you did it

albert123 09-09-2010 00:32

Re: How do you patch your hl1.dll to increase the precache limit?
 
How do we can set precache limit for model,sound, sprites for CS and HL ???

jim_yang 09-09-2010 01:16

Re: How do you patch your hl1.dll to increase the precache limit?
 
Code:

while ( dword_2166F90[v4] )
{
    if ( !sub_1D355F0((signed int *)dword_2166F90[v4], v2) )
        goto LABEL_20;
    ++v4;
    if ( v4 >= 512 )
    {
        sub_1D4E8F0("PF_precache_model_I: Model '%s' failed to precache because the item count is over the %d limit.\nReduce the number of brush models and/or regular models in the map to correct this.", v2, 512);
        return 0;
    }
}

part of the precache model function, you see that "dword_2166F90[ ]" this array is declared using 512 for its size, so when v4 goes above 512, this array overflowed, how can you store value when index is over 512, enlarge the array? As I can see, there are more arrays using 512 and related to the precache stuff.

solidjake 09-09-2010 13:31

Re: How do you patch your hl1.dll to increase the precache limit?
 
Then all you really need to do is find each array and change it accordingly to the same size. Where did you find this array?


All times are GMT -4. The time now is 02:46.

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