by kevans91 » Fri Dec 05, 2014 10:01 am
Graf Zahl wrote:It did work previously. It's also not something isolated to this specific use case. As I guessed, due to some recent changes, CCMDs on the command line are no longer executed before the game starts up but afterward - and that's simply not correct.
Ahh:
https://github.com/rheit/zdoom/commit/3 ... 85d346cdf1
There's got to be a better way of doing this. C_ExecCmdLineParams () seems to makes the 'execFiles = [...]' (and related line, from
this commit redundant and partially incorrect, since +exec can be specified as well. Knowing now that there IS some way to break this, would it be a reasonable solution to:
* Move that C_ExecCmdLineParams() back to where it was
* Add a storeCVars flag to C_DoCommand (set by passing through usePullin in C_ExecFile, in this case)
* Use a DStoredCommand (should get Tick()'d just before game startup, after initialization) to defer setting of cvars until later on in the process if(storeCVars)
This would defer setting cvars until just after NOSET-marked CVars get locked, though- I assume that behavior would need to change, given it's different from before.
[quote="Graf Zahl"]It did work previously. It's also not something isolated to this specific use case. As I guessed, due to some recent changes, CCMDs on the command line are no longer executed before the game starts up but afterward - and that's simply not correct.[/quote]
Ahh: [url]https://github.com/rheit/zdoom/commit/3c376aa342994971e0e3f578476e8085d346cdf1[/url]
There's got to be a better way of doing this. C_ExecCmdLineParams () seems to makes the 'execFiles = [...]' (and related line, from [url=https://github.com/rheit/zdoom/commit/dfde55d2496432ea11a8b9b91dca6c93e14801aa]this commit[/url] redundant and partially incorrect, since +exec can be specified as well. Knowing now that there IS some way to break this, would it be a reasonable solution to:
* Move that C_ExecCmdLineParams() back to where it was
* Add a storeCVars flag to C_DoCommand (set by passing through usePullin in C_ExecFile, in this case)
* Use a DStoredCommand (should get Tick()'d just before game startup, after initialization) to defer setting of cvars until later on in the process if(storeCVars)
This would defer setting cvars until just after NOSET-marked CVars get locked, though- I assume that behavior would need to change, given it's different from before.