by randi » Tue Oct 28, 2003 2:21 pm
Fixed. I thought Hexen always passed the three script parameters as the first three local variables to the script, but obviously not. In this case, script 10 is declared as (void), but the line that executes it is ACS_Execute (10, 5, 10, 0, 0). ZDoom took the first script parameter in that special (10) and used it to initialize the first variable in the script, since the script doesn't take arguments. It should have initialized the variable to 0, since it isn't a script parameter.
This confusion resulted because I wrote my ACS machine based on experimentation with Hexen before the Hexen source was released. I'm surprised nobody found this discrepancy sooner, since ZDoom has done it this way ever since it had ACS support.
Fixed. I thought Hexen always passed the three script parameters as the first three local variables to the script, but obviously not. In this case, script 10 is declared as (void), but the line that executes it is ACS_Execute (10, 5, 10, 0, 0). ZDoom took the first script parameter in that special (10) and used it to initialize the first variable in the script, since the script doesn't take arguments. It should have initialized the variable to 0, since it isn't a script parameter.
This confusion resulted because I wrote my ACS machine based on experimentation with Hexen before the Hexen source was released. I'm surprised nobody found this discrepancy sooner, since ZDoom has done it this way ever since it had ACS support.