diff --git a/inc/graph.h b/inc/graph.h index ca7973c..9a04670 100644 --- a/inc/graph.h +++ b/inc/graph.h @@ -389,8 +389,8 @@ public: m_highestDamage[team] = value; } - const char *getAuthor () const { - return m_tempStrings.chars (); + StringRef getAuthor () const { + return m_tempStrings; } bool hasChanged () const { diff --git a/meson.build b/meson.build index fcb2068..d5bea2b 100644 --- a/meson.build +++ b/meson.build @@ -86,7 +86,7 @@ if isCLang or isGCC or (isIntel and not isWindows) ] if isOptimize - flagsCompiler += '-msse3' + flagsCompiler += '-msse2' if (isCLang or isGCC) and not isDarwin flagsCompiler += '-flto' @@ -138,7 +138,7 @@ if isLinux or isDarwin else flagsCompiler += [ '-mtune=generic', - '-msse3', + '-msse2', '-mfpmath=sse', '-fno-builtin', '-funroll-loops', diff --git a/src/graph.cpp b/src/graph.cpp index 1c5681e..14d2a86 100644 --- a/src/graph.cpp +++ b/src/graph.cpp @@ -1783,10 +1783,10 @@ bool BotGraph::loadGraphData () { } if ((outOptions & StorageOption::Official) || strncmp (exten.author, "official", 8) == 0 || strlen (exten.author) < 2) { - m_tempStrings.assign ("Using Official Navigation Graph"); + m_tempStrings.assign (product.folder); } else { - m_tempStrings.assignf ("Navigation Graph Authored By: %s", exten.author); + m_tempStrings.assign (exten.author); } initNodesTypes (); loadPathMatrix (); @@ -2853,6 +2853,7 @@ BotGraph::BotGraph () { m_needsVisRebuild = false; m_jumpLearnNode = false; m_hasChanged = false; + m_narrowChecked = false; m_timeJumpStarted = 0.0f; m_lastJumpNode = kInvalidNodeIndex; diff --git a/src/support.cpp b/src/support.cpp index 4a7576e..bd87a87 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -281,6 +281,12 @@ void BotSupport::checkWelcome () { if (!game.is (GameFlags::Mobility | GameFlags::Xash3D)) { game.serverCommand ("speak \"%s\"", m_sentences.random ()); } + String authorStr = "Official Navigation Graph"; + StringRef graphAuthor = graph.getAuthor (); + + if (!graphAuthor.startsWith (product.folder)) { + authorStr.assignf ("Navigation Graph by: %s", graphAuthor); + } MessageWriter (MSG_ONE, msgs.id (NetMsg::TextMsg), nullptr, receiveEntity) .writeByte (HUD_PRINTTALK) @@ -304,7 +310,7 @@ void BotSupport::checkWelcome () { .writeShort (MessageWriter::fu16 (2.0f, 8.0f)) .writeShort (MessageWriter::fu16 (6.0f, 8.0f)) .writeShort (MessageWriter::fu16 (0.1f, 8.0f)) - .writeString (strings.format ("\nHello! You are playing with %s v%s (Revision: %s)\nDevised by %s\n\n%s", product.name, product.version, product.build.count, product.author, graph.getAuthor ())); + .writeString (strings.format ("\nHello! You are playing with %s v%s (Revision: %s)\nDevised by %s\n\n%s", product.name, product.version, product.build.count, product.author, authorStr)); m_welcomeReceiveTime = 0.0f; m_needToSendWelcome = false;