bot_commands_init();
print("List of all available commands:\n");
- print(" Command\t\t\t\tParameter Type\n");
+ print(" Command - Parameter Type\n");
for(i=1;i<BOT_CMD_COUNTER;++i)
{
ptype = "none";
break;
}
- print(strcat(" ",bot_cmd_string[i],"\t\t\t\t<",ptype,"> \n"));
+ print(strcat(" ",bot_cmd_string[i]," - <",ptype,"> \n"));
}
}
tokens = tokenizebyseparator(parms, " ");
- if(tokens==2)
+ if(tokens<2||tokens>3)
+ return CMD_STATUS_ERROR;
+
+ step = (tokens == 3) ? stof(argv(2)) : 0;
+
+ if(step == 0)
{
self.v_angle_x -= stof(argv(1));
self.v_angle_y += stof(argv(0));
return CMD_STATUS_FINISHED;
}
- if(tokens<2||tokens>3)
- return CMD_STATUS_ERROR;
-
- step = stof(argv(2));
-
self.bot_cmd_aim_begin = self.v_angle;
self.bot_cmd_aim_end_x = self.v_angle_x - stof(argv(1));