fix: toggling t and ct important flags when there are other flags on the node (#405)
fix: removed unnecessary condition for toggling the camp flag
This commit is contained in:
parent
6f18a6efd9
commit
fc493e288c
1 changed files with 3 additions and 10 deletions
|
|
@ -1447,7 +1447,7 @@ int BotControl::menuGraphFlag (int item) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (graph[nearest].flags == NodeFlag::CTOnly) {
|
if (graph[nearest].flags & NodeFlag::CTOnly) {
|
||||||
graph.toggleFlags (NodeFlag::CTOnly);
|
graph.toggleFlags (NodeFlag::CTOnly);
|
||||||
graph.toggleFlags (NodeFlag::TerroristOnly);
|
graph.toggleFlags (NodeFlag::TerroristOnly);
|
||||||
}
|
}
|
||||||
|
|
@ -1458,7 +1458,7 @@ int BotControl::menuGraphFlag (int item) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if (graph[nearest].flags == NodeFlag::TerroristOnly) {
|
if (graph[nearest].flags & NodeFlag::TerroristOnly) {
|
||||||
graph.toggleFlags (NodeFlag::TerroristOnly);
|
graph.toggleFlags (NodeFlag::TerroristOnly);
|
||||||
graph.toggleFlags (NodeFlag::CTOnly);
|
graph.toggleFlags (NodeFlag::CTOnly);
|
||||||
}
|
}
|
||||||
|
|
@ -1503,20 +1503,13 @@ int BotControl::menuGraphFlag (int item) {
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
// if the node doesn't have a camp flag, set it and open the camp directions selection menu
|
// if the node doesn't have a camp flag, set it and open the camp directions selection menu
|
||||||
if (!(graph[nearest].flags & NodeFlag::Crossing) && !(graph[nearest].flags & NodeFlag::Camp)) {
|
if (!(graph[nearest].flags & NodeFlag::Camp)) {
|
||||||
graph.toggleFlags (NodeFlag::Crossing);
|
|
||||||
graph.toggleFlags (NodeFlag::Camp);
|
|
||||||
showMenu (Menu::CampDirections);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if ((graph[nearest].flags & NodeFlag::Crossing) && !(graph[nearest].flags & NodeFlag::Camp)) {
|
|
||||||
graph.toggleFlags (NodeFlag::Camp);
|
graph.toggleFlags (NodeFlag::Camp);
|
||||||
showMenu (Menu::CampDirections);
|
showMenu (Menu::CampDirections);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// otherwise remove the flag, and don't show the camp directions selection menu
|
// otherwise remove the flag, and don't show the camp directions selection menu
|
||||||
else {
|
else {
|
||||||
graph.toggleFlags (NodeFlag::Crossing);
|
|
||||||
graph.toggleFlags (NodeFlag::Camp);
|
graph.toggleFlags (NodeFlag::Camp);
|
||||||
showMenu (Menu::NodeFlag);
|
showMenu (Menu::NodeFlag);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue