mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Expose all 9 arguments of createentity()
For whatever reason, not all arguments of createentity() are exposed in the command. We have to keep in mind that (1) unspecified arguments default to 0 (instead of the 320 and 240 for argument 8 and 9 that createentity() usually defaults to), and that (2) arguments persist across commands. (Why not get rid of argument persistence, you say? Unfortunately, some levels rely on argument persistence to call gotoposition() without specifying the third argument, even though you're supposed to specify all three arguments.) To add these arguments without breaking levels, I re-added the createentity() defaults of 320 and 240 for args 8 and 9, and then I reset the new arguments afterwards when I'm done. Technically this could be bad if other commands used those higher arguments, but none of them really do. (Except createcrewman(), but it only sets argument 6 to 0 sometimes anyway, but argument 6 is already supposed to default to 0.)
This commit is contained in:
parent
db06b336b6
commit
de2d6a1e86
1 changed files with 11 additions and 1 deletions
|
@ -703,7 +703,17 @@ void scriptclass::run()
|
|||
}
|
||||
else if (words[0] == "createentity")
|
||||
{
|
||||
obj.createentity(ss_toi(words[1]), ss_toi(words[2]), ss_toi(words[3]), ss_toi(words[4]), ss_toi(words[5]));
|
||||
if (words[6] == "") words[6] = "0";
|
||||
if (words[7] == "") words[7] = "0";
|
||||
if (words[8] == "") words[8] = "320";
|
||||
if (words[9] == "") words[9] = "240";
|
||||
obj.createentity(ss_toi(words[1]), ss_toi(words[2]), ss_toi(words[3]),
|
||||
ss_toi(words[4]), ss_toi(words[5]),
|
||||
ss_toi(words[6]), ss_toi(words[7]), ss_toi(words[8]), ss_toi(words[9]));
|
||||
words[6] = "";
|
||||
words[7] = "";
|
||||
words[8] = "";
|
||||
words[9] = "";
|
||||
}
|
||||
else if (words[0] == "createcrewman")
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue