mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 04:51:41 +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'));
|
||||
if (scripts.dw != NULL)
|
||||
{
|
||||
max = scripts.dw[1];
|
||||
max = scripts.dw[1] / 4;
|
||||
scripts.dw += 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;
|
||||
|
||||
script = num;
|
||||
assert(code->VarCount >= code->ArgCount);
|
||||
numlocalvars = code->VarCount;
|
||||
localvars = new SDWORD[code->VarCount];
|
||||
if (code->VarCount > 0)
|
||||
|
|
Loading…
Reference in a new issue