Skip to content

Commit

Permalink
Add p5 and p6 to createentity() scripting command
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyTally committed Nov 26, 2022
1 parent d7b479f commit 54d79ea
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions desktop_version/src/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,29 +783,19 @@ void scriptclass::run(void)
}
else if (words[0] == "createentity")
{
std::string word6 = words[6];
std::string word7 = words[7];
std::string word8 = words[8];
std::string word9 = words[9];
if (!argexists[6]) words[6] = "0";
if (!argexists[7]) words[7] = "0";
if (!argexists[8]) words[8] = "320";
if (!argexists[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])
ss_toi(argexists[6] ? words[6] : "0" ),
ss_toi(argexists[7] ? words[7] : "0" ),
ss_toi(argexists[8] ? words[8] : "320"),
ss_toi(argexists[9] ? words[9] : "240"),
ss_toi(argexists[10] ? words[10] : "320"),
ss_toi(argexists[11] ? words[11] : "240")
);
words[6] = word6;
words[7] = word7;
words[8] = word8;
words[9] = word9;
}
else if (words[0] == "createcrewman")
{
Expand Down

0 comments on commit 54d79ea

Please sign in to comment.