graph: reworked buckets so they can handle very large number of nodes
graph: reworked buckets so they can handle very large number of nodes aim: bots should more respect headshot allow option (needs testing) aim: incorporated never-finished changes from pr #204 nav: increased reachability timers a bit nav: ensure buckets has enough nodes before use they conf: introduced max recoil in difficulty config file bot: overall fixes to jason mode, treat knife in hands and no weapons as jason mode too bot: changed default difficulty level for bots to level 3 fix: knife attacks not working since last commit (fixes #429) fix: hostage rescue not working since last commit (fixes #427) refactor: use range loops for graph outside graph class when possible
This commit is contained in:
parent
3232c5a8b0
commit
1a650c57ce
14 changed files with 426 additions and 347 deletions
|
|
@ -589,7 +589,7 @@ int BotControl::cmdNodeClean () {
|
|||
if (strValue (option) == "all") {
|
||||
int removed = 0;
|
||||
|
||||
for (int i = 0; i < graph.length (); ++i) {
|
||||
for (auto i = 0; i < graph.length (); ++i) {
|
||||
removed += graph.clearConnections (i);
|
||||
}
|
||||
msg ("Done. Processed %d nodes. %d useless paths was cleared.", graph.length (), removed);
|
||||
|
|
@ -842,9 +842,9 @@ int BotControl::cmdNodeIterateCamp () {
|
|||
}
|
||||
}
|
||||
else if (op == "begin") {
|
||||
for (int i = 0; i < graph.length (); ++i) {
|
||||
if (graph[i].flags & NodeFlag::Camp) {
|
||||
m_campIterator.push (i);
|
||||
for (const auto &path : graph) {
|
||||
if (path.flags & NodeFlag::Camp) {
|
||||
m_campIterator.push (path.number);
|
||||
}
|
||||
}
|
||||
if (!m_campIterator.empty ()) {
|
||||
|
|
@ -877,8 +877,8 @@ int BotControl::cmdAdjustHeight () {
|
|||
auto heightOffset = floatValue (offset);
|
||||
|
||||
// adjust the height for all the nodes (negative values possible)
|
||||
for (int i = 0; i < graph.length (); ++i) {
|
||||
graph[i].origin.z += heightOffset;
|
||||
for (auto &path : graph) {
|
||||
path.origin.z += heightOffset;
|
||||
}
|
||||
return BotCommandResult::Handled;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue