mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Removed LoadProtoMaxLimit option from ddraw.ini.
* now the proto limit is always handled by set_proto_data function when needed, since the related issue was originally from using it to process lots of protos at once.
This commit is contained in:
@@ -366,10 +366,6 @@ CorpseDeleteTime=6
|
|||||||
;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use
|
;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use
|
||||||
ProcessorIdle=-1
|
ProcessorIdle=-1
|
||||||
|
|
||||||
;Set a number of how many protos per type can be loaded into memory at once (valid range: 512..4096)
|
|
||||||
;Set to -1 to let set_proto_data script function automatically increase the limit when needed
|
|
||||||
LoadProtoMaxLimit=-1
|
|
||||||
|
|
||||||
;Set to 1 if using the hero appearance mod
|
;Set to 1 if using the hero appearance mod
|
||||||
;You can add AppChCrt.frm and AppChEdt.frm files to art\intrface\ to set a custom background for the character screen
|
;You can add AppChCrt.frm and AppChEdt.frm files to art\intrface\ to set a custom background for the character screen
|
||||||
EnableHeroAppearanceMod=0
|
EnableHeroAppearanceMod=0
|
||||||
|
|||||||
@@ -127,9 +127,7 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Objects::LoadProtoAutoMaxLimit() {
|
void Objects::LoadProtoAutoMaxLimit() {
|
||||||
if (maxCountProto != -1) {
|
MakeCall(0x4A21B2, proto_ptr_hack);
|
||||||
MakeCall(0x4A21B2, proto_ptr_hack);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Objects::init() {
|
void Objects::init() {
|
||||||
@@ -137,15 +135,6 @@ void Objects::init() {
|
|||||||
RestoreObjUnjamAllLocks();
|
RestoreObjUnjamAllLocks();
|
||||||
};
|
};
|
||||||
|
|
||||||
int maxlimit = GetConfigInt("Misc", "LoadProtoMaxLimit", -1);
|
|
||||||
if (maxlimit != -1) {
|
|
||||||
maxCountProto = -1;
|
|
||||||
if (maxlimit > 512) {
|
|
||||||
if (maxlimit > 4096) maxlimit = 4096;
|
|
||||||
SafeWrite32(0x4A21B3, maxlimit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HookCall(0x4A38A5, new_obj_id_hook);
|
HookCall(0x4A38A5, new_obj_id_hook);
|
||||||
SafeWrite8(0x4A38B3, 0x90); // fix ID increment
|
SafeWrite8(0x4A38B3, 0x90); // fix ID increment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user