control: don't enable spawn points highlighting by toggling noclip or auto add node mode when graph editor is enabled

This commit is contained in:
Владислав Сухов 2023-04-20 10:56:37 +00:00
commit f67c0ab75a

View file

@ -396,17 +396,31 @@ int BotControl::cmdNodeOn () {
else if (strValue (option) == "noclip") { else if (strValue (option) == "noclip") {
m_ent->v.movetype = MOVETYPE_NOCLIP; m_ent->v.movetype = MOVETYPE_NOCLIP;
if (graph.hasEditFlag (GraphEdit::On)) {
graph.setEditFlag (GraphEdit::Noclip);
msg ("Noclip mode enabled.");
}
else {
graph.setEditFlag (GraphEdit::On | GraphEdit::Noclip); graph.setEditFlag (GraphEdit::On | GraphEdit::Noclip);
enableDrawModels (true); enableDrawModels (true);
msg ("Graph editor has been enabled with noclip mode."); msg ("Graph editor has been enabled with noclip mode.");
} }
}
else if (strValue (option) == "auto") { else if (strValue (option) == "auto") {
if (graph.hasEditFlag (GraphEdit::On)) {
graph.setEditFlag (GraphEdit::Auto);
msg ("Enabled auto nodes placement.");
}
else {
graph.setEditFlag (GraphEdit::On | GraphEdit::Auto); graph.setEditFlag (GraphEdit::On | GraphEdit::Auto);
enableDrawModels (true); enableDrawModels (true);
msg ("Graph editor has been enabled with auto add node mode."); msg ("Graph editor has been enabled with auto add node mode.");
} }
}
if (graph.hasEditFlag (GraphEdit::On)) { if (graph.hasEditFlag (GraphEdit::On)) {
mp_roundtime.set (9); mp_roundtime.set (9);