Skip to content

Commit 54a8925

Browse files
author
Motive
committed
- @modelswap will now take an optional second parameter for variation.
1 parent a7e155d commit 54a8925

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Commands/UnitCommands.galaxy

+4
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,7 @@ bool libcrtx_command_order(bool testConds, bool runActions) {
15091509
bool libcrtx_command_modelswap(bool testConds, bool runActions)
15101510
{
15111511
string model = libcrtx_param_index(2);
1512+
string variation = libcrtx_param_index(3);
15121513
string amsg;
15131514
unitgroup g = libcrtx_chat_get_context(EventPlayer());
15141515

@@ -1519,6 +1520,9 @@ bool libcrtx_command_modelswap(bool testConds, bool runActions)
15191520
return true;
15201521
}
15211522
amsg = "ModelSwap {" + model + "}";
1523+
if( variation != "" && StringToInt(variation) >= 0 ) {
1524+
amsg += " {" + variation + "}";
1525+
}
15221526

15231527
UnitGroupLoopBegin(g);
15241528
while(!UnitGroupLoopDone())

0 commit comments

Comments
 (0)