bot: refactor and clean up old code
fix: crash when saving old format pwf on hlds bot: moved sdk headers to separate submodule nav: improved unstuck and avoidance (thanks @commandcobra7) code bot: use correct path slashes depending on platform for all data cfg: removed simplified chines' translation, as it's too outdated
This commit is contained in:
parent
48e157c7b4
commit
7b58d51973
42 changed files with 365 additions and 3805 deletions
|
|
@ -1648,8 +1648,20 @@ bool BotGraph::saveGraphData () {
|
|||
void BotGraph::saveOldFormat () {
|
||||
PODGraphHeader header {};
|
||||
|
||||
String editorName;
|
||||
|
||||
if (game.isNullEntity (m_editor) && !m_graphAuthor.empty ()) {
|
||||
editorName = m_graphAuthor;
|
||||
}
|
||||
else if (!game.isNullEntity (m_editor)) {
|
||||
editorName = m_editor->v.netname.chars ();
|
||||
}
|
||||
else {
|
||||
editorName = product.name;
|
||||
}
|
||||
|
||||
strings.copy (header.header, kPodbotMagic, sizeof (kPodbotMagic));
|
||||
strings.copy (header.author, m_editor->v.netname.chars (), cr::bufsize (header.author));
|
||||
strings.copy (header.author, editorName.chars (), cr::bufsize (header.author));
|
||||
strings.copy (header.mapName, game.getMapName (), cr::bufsize (header.mapName));
|
||||
|
||||
header.mapName[31] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue