mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 17:51:11 +00:00
- Fixed: Forgot to divide the length of the SVCT chunks in ACS objects by 4 to get the actual
number of scripts to set VarCount for. SVN r3352 (trunk)
This commit is contained in:
parent
e4728ba6f0
commit
cd150bd170
1 changed files with 3 additions and 2 deletions
|
@ -1529,11 +1529,11 @@ void FBehavior::LoadScriptsDirectory ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load script var counts
|
// Load script var counts. (Only recorded for scripts that use more than LOCAL_SIZE variables.)
|
||||||
scripts.b = FindChunk (MAKE_ID('S','V','C','T'));
|
scripts.b = FindChunk (MAKE_ID('S','V','C','T'));
|
||||||
if (scripts.dw != NULL)
|
if (scripts.dw != NULL)
|
||||||
{
|
{
|
||||||
max = scripts.dw[1];
|
max = scripts.dw[1] / 4;
|
||||||
scripts.dw += 2;
|
scripts.dw += 2;
|
||||||
for (i = max; i > 0; --i, scripts.w += 2)
|
for (i = max; i > 0; --i, scripts.w += 2)
|
||||||
{
|
{
|
||||||
|
@ -6999,6 +6999,7 @@ DLevelScript::DLevelScript (AActor *who, line_t *where, int num, const ScriptPtr
|
||||||
new DACSThinker;
|
new DACSThinker;
|
||||||
|
|
||||||
script = num;
|
script = num;
|
||||||
|
assert(code->VarCount >= code->ArgCount);
|
||||||
numlocalvars = code->VarCount;
|
numlocalvars = code->VarCount;
|
||||||
localvars = new SDWORD[code->VarCount];
|
localvars = new SDWORD[code->VarCount];
|
||||||
if (code->VarCount > 0)
|
if (code->VarCount > 0)
|
||||||
|
|
Loading…
Reference in a new issue