Some menu tweaks (#397)
* add: debug goal menu and new node flags to the flag selection menu * translate: russian: translated new lines * update: bump the year
This commit is contained in:
parent
11c5e045d1
commit
2d2ca5fd22
31 changed files with 259 additions and 64 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2004-2022 YaPB Project <yapb@jeefo.net>
|
||||
Copyright (c) 2004-2023 YaPB Project <yapb@jeefo.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@
|
|||
[ORIGINAL]
|
||||
\yWaypoint Operations (Page 2)\w
|
||||
|
||||
1. Waypoint stats
|
||||
1. Debug goal
|
||||
2. Autowaypoint on/off
|
||||
3. Set flags
|
||||
4. Save waypoints
|
||||
|
|
@ -275,7 +275,7 @@
|
|||
[TRANSLATED]
|
||||
\yОперации с вэйпонтами (Стр. 2)\w
|
||||
|
||||
1. Показать статистику
|
||||
1. Отладка цели
|
||||
2. Вкл./Выкл. автовэйпоинт
|
||||
3. Установить флаг
|
||||
4. Сохранить вэйпоинты
|
||||
|
|
@ -349,6 +349,24 @@
|
|||
|
||||
\w0. Выход
|
||||
|
||||
[ORIGINAL]
|
||||
\yDebug goal\w
|
||||
|
||||
1. Debug nearest node
|
||||
2. Debug facing node
|
||||
3. Stop debugging
|
||||
|
||||
0. Exit
|
||||
|
||||
[TRANSLATED]
|
||||
\yОтладка цели\w
|
||||
|
||||
1. Отладить ближайшую точку
|
||||
2. Отладить выделенную точку
|
||||
3. Прекратить отладку
|
||||
|
||||
0. Выход
|
||||
|
||||
[ORIGINAL]
|
||||
\yToggle Waypoint Flags\w
|
||||
|
||||
|
|
@ -357,6 +375,10 @@
|
|||
3. CTs Specific
|
||||
4. Use Elevator
|
||||
5. Sniper Point (\yFor Camp Points Only!\w)
|
||||
6. Map Goal
|
||||
7. Rescue Zone
|
||||
8. Crouch Down
|
||||
9. Camp Point
|
||||
|
||||
0. Exit
|
||||
|
||||
|
|
@ -368,6 +390,26 @@
|
|||
3. Только для Контр-террористов
|
||||
4. Использовать лифт
|
||||
5. Снайперский (\yТолько для кемперских точек!\w)
|
||||
6. Цель карты
|
||||
7. Зона спасения
|
||||
8. Присесть
|
||||
9. Кемперская точка
|
||||
|
||||
0. Выход
|
||||
|
||||
[ORIGINAL]
|
||||
\ySet Camp Point directions\w
|
||||
|
||||
1. Camp Start
|
||||
2. Camp End
|
||||
|
||||
0. Exit
|
||||
|
||||
[TRANSLATED]
|
||||
\yНастройка направлений кемперской точки\w
|
||||
|
||||
1. Начало кемперской точки
|
||||
2. Конец кемперской точки
|
||||
|
||||
0. Выход
|
||||
|
||||
|
|
@ -705,25 +747,25 @@ Node %d camp-endposition not set.
|
|||
You didn't set a rescue point.
|
||||
|
||||
[TRANSLATED]
|
||||
Ты не установил зону спасения заложников.
|
||||
Вы не установили точку спасения заложников.
|
||||
|
||||
[ORIGINAL]
|
||||
You didn't set any terrorist important point.
|
||||
|
||||
[TRANSLATED]
|
||||
Ты не установил ни одной важной точки для террористов.
|
||||
Вы не установили ни одной важной точки для террористов.
|
||||
|
||||
[ORIGINAL]
|
||||
You didn't set any CT important point.
|
||||
|
||||
[TRANSLATED]
|
||||
Ты не установил ни одной важной точки для контр-террористов.
|
||||
Вы не установили ни одной важной точки для контр-террористов.
|
||||
|
||||
[ORIGINAL]
|
||||
You didn't set any goal point.
|
||||
|
||||
[TRANSLATED]
|
||||
Ты не установил ни одну главную точку.
|
||||
Вы не установили ни одну целевую точку.
|
||||
|
||||
[ORIGINAL]
|
||||
Path broken from node 0 to node %d.
|
||||
|
|
@ -949,11 +991,29 @@ There are errors, see console
|
|||
[TRANSLATED]
|
||||
Есть ошибки, смотри консоль
|
||||
|
||||
[ORIGINAL]
|
||||
Debug goal is set to node %d.
|
||||
|
||||
[TRANSLATED]
|
||||
Отладка цели настроена на точку %d.
|
||||
|
||||
[ORIGINAL]
|
||||
Cannot find the node. Debug goal is disabled.
|
||||
|
||||
[TRANSLATED]
|
||||
Не удаётся найти точку. Отладка цели отключена.
|
||||
|
||||
[ORIGINAL]
|
||||
Debug goal is disabled.
|
||||
|
||||
[TRANSLATED]
|
||||
Отладка цели отключена.
|
||||
|
||||
[ORIGINAL]
|
||||
You're dead, and have no access to this menu
|
||||
|
||||
[TRANSLATED]
|
||||
Ты мёртв, и не имеешь доступа к этому меню
|
||||
Вы мертвы, и не имеете доступа к этому меню
|
||||
|
||||
[ORIGINAL]
|
||||
Autopathing is now disabled.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -140,8 +140,10 @@ private:
|
|||
int menuGraphPage2 (int item);
|
||||
int menuGraphRadius (int item);
|
||||
int menuGraphType (int item);
|
||||
int menuGraphDebug (int item);
|
||||
int menuGraphFlag (int item);
|
||||
int menuGraphPath (int item);
|
||||
int menuCampDirections (int item);
|
||||
int menuAutoPathDistance (int item);
|
||||
int menuKickPage1 (int item);
|
||||
int menuKickPage2 (int item);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -321,7 +321,7 @@ public:
|
|||
int getFarest (const Vector &origin, float maxDistance = 32.0);
|
||||
int getNearest (const Vector &origin, float minDistance = kInfiniteDistance, int flags = -1);
|
||||
int getNearestNoBuckets (const Vector &origin, float minDistance = kInfiniteDistance, int flags = -1);
|
||||
int getEditorNeareset ();
|
||||
int getEditorNearest ();
|
||||
int getDangerIndex (int team, int start, int goal);
|
||||
int getDangerValue (int team, int start, int goal);
|
||||
int getDangerDamage (int team, int start, int goal);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -68,6 +68,8 @@ CR_DECLARE_SCOPED_ENUM (Menu,
|
|||
NodeFlag,
|
||||
NodeAutoPath,
|
||||
NodePath,
|
||||
NodeDebug,
|
||||
CampDirections,
|
||||
KickPage1,
|
||||
KickPage2,
|
||||
KickPage3,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
# Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
# Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-#
|
||||
|
||||
# YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
# Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
# Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
153
src/control.cpp
153
src/control.cpp
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -564,7 +564,7 @@ int BotControl::cmdNodeCache () {
|
|||
// turn graph on
|
||||
graph.setEditFlag (GraphEdit::On);
|
||||
|
||||
// if "neareset" or nothing passed delete neareset, else delete by index
|
||||
// if "nearest" or nothing passed delete nearest, else delete by index
|
||||
if (strValue (nearest).empty () || strValue (nearest) == "nearest") {
|
||||
graph.cachePoint (kInvalidNodeIndex);
|
||||
}
|
||||
|
|
@ -595,9 +595,9 @@ int BotControl::cmdNodeClean () {
|
|||
msg ("Done. Processed %d nodes. %d useless paths was cleared.", graph.length (), removed);
|
||||
}
|
||||
else if (strValue (option).empty () || strValue (option) == "nearest") {
|
||||
int removed = graph.clearConnections (graph.getEditorNeareset ());
|
||||
int removed = graph.clearConnections (graph.getEditorNearest ());
|
||||
|
||||
msg ("Done. Processed node %d. %d useless paths was cleared.", graph.getEditorNeareset (), removed);
|
||||
msg ("Done. Processed node %d. %d useless paths was cleared.", graph.getEditorNearest (), removed);
|
||||
}
|
||||
else {
|
||||
int index = intValue (option);
|
||||
|
|
@ -625,7 +625,7 @@ int BotControl::cmdNodeSetRadius () {
|
|||
int radiusIndex = kInvalidNodeIndex;
|
||||
|
||||
if (strValue (index).empty () || strValue (index) == "nearest") {
|
||||
radiusIndex = graph.getEditorNeareset ();
|
||||
radiusIndex = graph.getEditorNearest ();
|
||||
}
|
||||
else {
|
||||
radiusIndex = intValue (index);
|
||||
|
|
@ -1268,9 +1268,7 @@ int BotControl::menuGraphPage2 (int item) {
|
|||
|
||||
switch (item) {
|
||||
case 1:
|
||||
graph.showStats ();
|
||||
showMenu (Menu::NodeMainPage2);
|
||||
|
||||
showMenu (Menu::NodeDebug);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
@ -1395,8 +1393,52 @@ int BotControl::menuGraphType (int item) {
|
|||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
||||
int BotControl::menuGraphDebug (int item) {
|
||||
closeMenu (); // reset menu display
|
||||
|
||||
switch (item) {
|
||||
case 1:
|
||||
graph.setEditFlag (GraphEdit::On);
|
||||
|
||||
cv_debug_goal.set (graph.getEditorNearest ());
|
||||
if (cv_debug_goal.int_ () != kInvalidNodeIndex) {
|
||||
msg ("Debug goal is set to node %d.", cv_debug_goal.int_ ());
|
||||
}
|
||||
else {
|
||||
msg ("Cannot find the node. Debug goal is disabled.");
|
||||
}
|
||||
showMenu (Menu::NodeDebug);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
graph.setEditFlag (GraphEdit::On);
|
||||
|
||||
cv_debug_goal.set (graph.getFacingIndex ());
|
||||
if (cv_debug_goal.int_ () != kInvalidNodeIndex) {
|
||||
msg ("Debug goal is set to node %d.", cv_debug_goal.int_ ());
|
||||
}
|
||||
else {
|
||||
msg ("Cannot find the node. Debug goal is disabled.");
|
||||
}
|
||||
showMenu (Menu::NodeDebug);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
cv_debug_goal.set (kInvalidNodeIndex);
|
||||
msg ("Debug goal is disabled.");
|
||||
showMenu (Menu::NodeDebug);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
closeMenu ();
|
||||
break;
|
||||
}
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
||||
int BotControl::menuGraphFlag (int item) {
|
||||
closeMenu (); // reset menu display
|
||||
int nearest = graph.getEditorNearest ();
|
||||
|
||||
switch (item) {
|
||||
case 1:
|
||||
|
|
@ -1405,12 +1447,24 @@ int BotControl::menuGraphFlag (int item) {
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (graph[nearest].flags == NodeFlag::CTOnly) {
|
||||
graph.toggleFlags (NodeFlag::CTOnly);
|
||||
graph.toggleFlags (NodeFlag::TerroristOnly);
|
||||
}
|
||||
else {
|
||||
graph.toggleFlags (NodeFlag::TerroristOnly);
|
||||
}
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (graph[nearest].flags == NodeFlag::TerroristOnly) {
|
||||
graph.toggleFlags (NodeFlag::TerroristOnly);
|
||||
graph.toggleFlags (NodeFlag::CTOnly);
|
||||
}
|
||||
else {
|
||||
graph.toggleFlags (NodeFlag::CTOnly);
|
||||
}
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
|
|
@ -1423,6 +1477,60 @@ int BotControl::menuGraphFlag (int item) {
|
|||
graph.toggleFlags (NodeFlag::Sniper);
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
graph.toggleFlags (NodeFlag::Goal);
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
graph.toggleFlags (NodeFlag::Rescue);
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (graph[nearest].flags != NodeFlag::Crouch) {
|
||||
graph.toggleFlags (NodeFlag::Crouch);
|
||||
graph[nearest].origin.z += -18.0f;
|
||||
}
|
||||
else {
|
||||
graph.toggleFlags (NodeFlag::Crouch);
|
||||
graph[nearest].origin.z += 18.0f;
|
||||
}
|
||||
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
// if the node doesn't have a camp flag, set it and open the camp directions selection menu
|
||||
if (graph[nearest].flags != NodeFlag::Camp) {
|
||||
graph.toggleFlags (NodeFlag::Camp);
|
||||
showMenu (Menu::CampDirections);
|
||||
break;
|
||||
}
|
||||
// otherwise remove the flag, and don't show the camp directions selection menu
|
||||
else {
|
||||
graph.toggleFlags (NodeFlag::Camp);
|
||||
showMenu (Menu::NodeFlag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
||||
int BotControl::menuCampDirections (int item) {
|
||||
closeMenu (); // reset menu display
|
||||
|
||||
switch (item) {
|
||||
case 1:
|
||||
graph.add (NodeAddFlag::Camp);
|
||||
showMenu (Menu::CampDirections);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
graph.add (NodeAddFlag::CampEnd);
|
||||
showMenu (Menu::CampDirections);
|
||||
break;
|
||||
}
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
|
@ -2140,7 +2248,7 @@ void BotControl::createMenus () {
|
|||
m_menus.emplace (
|
||||
Menu::NodeMainPage2, keys (9),
|
||||
"\\yWaypoint Operations (Page 2)\\w\n\n"
|
||||
"1. Waypoint stats\n"
|
||||
"1. Debug goal\n"
|
||||
"2. Autowaypoint on/off\n"
|
||||
"3. Set flags\n"
|
||||
"4. Save waypoints\n"
|
||||
|
|
@ -2184,18 +2292,41 @@ void BotControl::createMenus () {
|
|||
"0. Exit",
|
||||
&BotControl::menuGraphType);
|
||||
|
||||
// debug goal menu
|
||||
m_menus.emplace (
|
||||
Menu::NodeDebug, keys (3),
|
||||
"\\yDebug goal\\w\n\n"
|
||||
"1. Debug nearest node\n"
|
||||
"2. Debug facing node\n"
|
||||
"3. Stop debugging\n\n"
|
||||
"0. Exit",
|
||||
&BotControl::menuGraphDebug);
|
||||
|
||||
// set waypoint flag menu
|
||||
m_menus.emplace (
|
||||
Menu::NodeFlag, keys (5),
|
||||
Menu::NodeFlag, keys (9),
|
||||
"\\yToggle Waypoint Flags\\w\n\n"
|
||||
"1. Block with Hostage\n"
|
||||
"2. Terrorists Specific\n"
|
||||
"3. CTs Specific\n"
|
||||
"4. Use Elevator\n"
|
||||
"5. Sniper Point (\\yFor Camp Points Only!\\w)\n\n"
|
||||
"5. Sniper Point (\\yFor Camp Points Only!\\w)\n"
|
||||
"6. Map Goal\n"
|
||||
"7. Rescue Zone\n"
|
||||
"8. Crouch Down\n"
|
||||
"9. Camp Point\n\n"
|
||||
"0. Exit",
|
||||
&BotControl::menuGraphFlag);
|
||||
|
||||
// set camp directions menu
|
||||
m_menus.emplace (
|
||||
Menu::CampDirections, keys (2),
|
||||
"\\ySet Camp Point directions\\w\n\n"
|
||||
"1. Camp Start\n"
|
||||
"2. Camp End\n\n"
|
||||
"0. Exit",
|
||||
&BotControl::menuCampDirections);
|
||||
|
||||
// auto-path max distance
|
||||
m_menus.emplace (
|
||||
Menu::NodeAutoPath, keys (7),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -483,7 +483,7 @@ int BotGraph::getNearestNoBuckets (const Vector &origin, float minDistance, int
|
|||
return index;
|
||||
}
|
||||
|
||||
int BotGraph::getEditorNeareset () {
|
||||
int BotGraph::getEditorNearest () {
|
||||
if (!hasEditFlag (GraphEdit::On)) {
|
||||
return kInvalidNodeIndex;
|
||||
}
|
||||
|
|
@ -564,7 +564,7 @@ void BotGraph::add (int type, const Vector &pos) {
|
|||
|
||||
switch (type) {
|
||||
case NodeAddFlag::Camp:
|
||||
index = getEditorNeareset ();
|
||||
index = getEditorNearest ();
|
||||
|
||||
if (index != kInvalidNodeIndex) {
|
||||
path = &m_paths[index];
|
||||
|
|
@ -580,7 +580,7 @@ void BotGraph::add (int type, const Vector &pos) {
|
|||
break;
|
||||
|
||||
case NodeAddFlag::CampEnd:
|
||||
index = getEditorNeareset ();
|
||||
index = getEditorNearest ();
|
||||
|
||||
if (index != kInvalidNodeIndex) {
|
||||
path = &m_paths[index];
|
||||
|
|
@ -597,7 +597,7 @@ void BotGraph::add (int type, const Vector &pos) {
|
|||
return;
|
||||
|
||||
case NodeAddFlag::JumpStart:
|
||||
index = getEditorNeareset ();
|
||||
index = getEditorNearest ();
|
||||
|
||||
if (index != kInvalidNodeIndex && m_paths[index].number >= 0) {
|
||||
float distance = m_editor->v.origin.distance (m_paths[index].origin);
|
||||
|
|
@ -615,7 +615,7 @@ void BotGraph::add (int type, const Vector &pos) {
|
|||
break;
|
||||
|
||||
case NodeAddFlag::JumpEnd:
|
||||
index = getEditorNeareset ();
|
||||
index = getEditorNearest ();
|
||||
|
||||
if (index != kInvalidNodeIndex && m_paths[index].number >= 0) {
|
||||
float distance = m_editor->v.origin.distance (m_paths[index].origin);
|
||||
|
|
@ -639,7 +639,7 @@ void BotGraph::add (int type, const Vector &pos) {
|
|||
}
|
||||
|
||||
if (addNewNode) {
|
||||
auto nearest = getEditorNeareset ();
|
||||
auto nearest = getEditorNearest ();
|
||||
|
||||
// do not allow to place waypoints "inside" waypoints, make at leat 10 units range
|
||||
if (exists (nearest) && newOrigin.distanceSq (m_paths[nearest].origin) < cr::square (10.0f)) {
|
||||
|
|
@ -837,7 +837,7 @@ void BotGraph::erase (int target) {
|
|||
if (bots.hasBotsOnline ()) {
|
||||
bots.kickEveryone (true);
|
||||
}
|
||||
const int index = (target == kInvalidNodeIndex) ? getEditorNeareset () : target;
|
||||
const int index = (target == kInvalidNodeIndex) ? getEditorNearest () : target;
|
||||
|
||||
if (!exists (index)) {
|
||||
return;
|
||||
|
|
@ -878,7 +878,7 @@ void BotGraph::erase (int target) {
|
|||
void BotGraph::toggleFlags (int toggleFlag) {
|
||||
// this function allow manually changing flags
|
||||
|
||||
int index = getEditorNeareset ();
|
||||
int index = getEditorNearest ();
|
||||
|
||||
if (index != kInvalidNodeIndex) {
|
||||
if (m_paths[index].flags & toggleFlag) {
|
||||
|
|
@ -900,7 +900,7 @@ void BotGraph::toggleFlags (int toggleFlag) {
|
|||
void BotGraph::setRadius (int index, float radius) {
|
||||
// this function allow manually setting the zone radius
|
||||
|
||||
int node = exists (index) ? index : getEditorNeareset ();
|
||||
int node = exists (index) ? index : getEditorNearest ();
|
||||
|
||||
if (node != kInvalidNodeIndex) {
|
||||
m_paths[node].radius = static_cast <float> (radius);
|
||||
|
|
@ -930,7 +930,7 @@ int BotGraph::getFacingIndex () {
|
|||
// find the waypoint the user is pointing at
|
||||
|
||||
Twin <int32, float> result { kInvalidNodeIndex, 5.32f };
|
||||
auto nearestNode = getEditorNeareset ();
|
||||
auto nearestNode = getEditorNearest ();
|
||||
|
||||
// check bounds from eyes of editor
|
||||
const auto &editorEyes = m_editor->v.origin + m_editor->v.view_ofs;
|
||||
|
|
@ -974,7 +974,7 @@ int BotGraph::getFacingIndex () {
|
|||
void BotGraph::pathCreate (char dir) {
|
||||
// this function allow player to manually create a path from one node to another
|
||||
|
||||
int nodeFrom = getEditorNeareset ();
|
||||
int nodeFrom = getEditorNearest ();
|
||||
|
||||
if (nodeFrom == kInvalidNodeIndex) {
|
||||
ctrl.msg ("Unable to find nearest node in 50 units.");
|
||||
|
|
@ -1017,7 +1017,7 @@ void BotGraph::pathCreate (char dir) {
|
|||
void BotGraph::erasePath () {
|
||||
// this function allow player to manually remove a path from one node to another
|
||||
|
||||
int nodeFrom = getEditorNeareset ();
|
||||
int nodeFrom = getEditorNearest ();
|
||||
|
||||
if (nodeFrom == kInvalidNodeIndex) {
|
||||
ctrl.msg ("Unable to find nearest node in 50 units.");
|
||||
|
|
@ -1067,7 +1067,7 @@ void BotGraph::erasePath () {
|
|||
}
|
||||
|
||||
void BotGraph::cachePoint (int index) {
|
||||
int node = exists (index) ? index : getEditorNeareset ();
|
||||
int node = exists (index) ? index : getEditorNearest ();
|
||||
|
||||
if (node == kInvalidNodeIndex) {
|
||||
m_cacheNodeIndex = kInvalidNodeIndex;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2022 YaPB Project <yapb@jeefo.net>.
|
||||
// Copyright © 2004-2023 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
|
@ -24,7 +24,7 @@ FILETYPE 0x2 {
|
|||
BLOCK "040904E4" {
|
||||
VALUE "CompanyName", "YaPB Project" "\0"
|
||||
VALUE "FileDescription", "YaPB v" MODULE_BOT_VERSION "." MODULE_BUILD_COUNT " - The Counter-Strike Bot" "\0"
|
||||
VALUE "LegalCopyright", "Copyright \251 2022 YaPB Project" "\0"
|
||||
VALUE "LegalCopyright", "Copyright \251 2023 YaPB Project" "\0"
|
||||
VALUE "OriginalFilename", "yapb.dll" "\0"
|
||||
VALUE "ProductName", "YaPB" "\0"
|
||||
VALUE "InternalName", "YaPB DLL" "\0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue