fix: removed duplicate messages with cache points in console command (resolves #286)

fix: massive message overflow when displaying nodes info (resolves #287)
add: yb_graph_draw_distance,cvar so you can specify visible nodes draw distance in editing mode
This commit is contained in:
dmitry 2022-01-21 23:39:26 +03:00
commit c0d2ae4915
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
2 changed files with 65 additions and 73 deletions

View file

@ -564,8 +564,6 @@ int BotControl::cmdNodeCache () {
// if "neareset" or nothing passed delete neareset, else delete by index
if (strValue (nearest).empty () || strValue (nearest) == "nearest") {
graph.cachePoint (kInvalidNodeIndex);
msg ("Nearest node has been put into the memory.");
}
else {
int index = intValue (nearest);
@ -573,10 +571,6 @@ int BotControl::cmdNodeCache () {
// check for existence
if (graph.exists (index)) {
graph.cachePoint (index);
msg ("Node %d has been put into the memory.", index);
}
else {
msg ("Could not put node %d into the memory.", index);
}
}
return BotCommandResult::Handled;