While working on a PR for #13 I've noticed that some scripting functions are called with additional zero parameters not implied by message_defines. My currrent theory is that function calls store argument byte length inside their first parameter instead of a plain number of arguments, which leads to excessive array allocation in the current version of code. Here is a small patch to change this behaviour. It doesn't seem to break existing scripting functions since there aren't any implemented ones that have entities passed to them as an argument.
While working on a PR for #13 I've noticed that some scripting functions are called with additional zero parameters not implied by message_defines. My currrent theory is that function calls store argument byte length inside their first parameter instead of a plain number of arguments, which leads to excessive array allocation in the current version of code. Here is a small patch to change this behaviour. It doesn't seem to break existing scripting functions since there aren't any implemented ones that have entities passed to them as an argument.