// If so, lets continue and finally move the player
client.team_forced = 0;
- MoveToTeam(client, team_id, 6);
- successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
- LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
+ if (MoveToTeam(client, team_id, 6))
+ {
+ successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
+ LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
+ }
+ else
+ {
+ LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ")");
+ }
continue;
}
else
case "walk":
{
- if (argc == 4)
+ if (argc == 4 || argc == 5)
{
e = nextent(NULL);
- if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL)) LOG_INFO("can walk");
- else LOG_INFO("cannot walk");
+ if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), stof(argv(4)), MOVE_NORMAL))
+ LOG_INFO("can walk");
+ else
+ LOG_INFO("cannot walk");
return;
}
}
LOG_INFO("Incorrect parameters for ^2trace^7");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("Usage:^3 sv_cmd trace command (startpos endpos)");
+ LOG_INFO("Usage:^3 sv_cmd trace command [startpos endpos] [endpos_height]");
+ LOG_INFO(" Where startpos and endpos are parameters for 'walk' and 'showline' commands,");
+ LOG_INFO(" 'endpos_height' is an optional parameter for 'walk' command,");
LOG_INFO(" Full list of commands here: \"debug, debug2, walk, showline.\"");
LOG_INFO("See also: ^2bbox, gettaginfo^7");
return;