When script flags are loaded, the max variable is set to scripts.dw[1] and not to scripts.dw[1] / 4 like the var count lister.
A consequence of this is that the flags reader gets garbage entries, setting the script 1's flags to 0 (should be NET CLIENTSIDE) in the process.
If you sneak a debugline
Code: Select all
Printf ("Setting flags of %d to %d.\n", scripts.sw[0], scripts.w[1]);
Code: Select all
ptr->Flags = LittleShort(scripts.w[1]);
The third line indicates the engine resetting script 1's flags.Setting flags of 1 to 3.
Setting flags of 2 to 2.
Setting flags of 1 to 0.
In short, r3352 fixed this problem for var counts. Script flags need similar treatment.