license: changed to more permessive MIT license.
add: set models for spawn points, only when requesting, instead of setting on every map start. fix: more translation fixes.
This commit is contained in:
parent
d9ca54dab3
commit
71355066a4
50 changed files with 193 additions and 1228 deletions
21
inc/config.h
21
inc/config.h
|
|
@ -1,23 +1,15 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
// botname structure definition
|
||||
struct BotName {
|
||||
String name = "";
|
||||
String name;
|
||||
int usedBy = -1;
|
||||
|
||||
public:
|
||||
|
|
@ -67,8 +59,6 @@ private:
|
|||
SmallArray <int32> m_botBuyEconomyTable = { 1900, 2100, 2100, 4000, 6000, 7000, 16000, 1200, 800, 1000, 3000 };
|
||||
SmallArray <int32> m_grenadeBuyPrecent = { 95, 85, 60 };
|
||||
|
||||
bool m_enableTranslation; // enable or disables translated output
|
||||
|
||||
public:
|
||||
BotConfig ();
|
||||
~BotConfig () = default;
|
||||
|
|
@ -142,11 +132,6 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
// enables messages translation
|
||||
void enableTranslation (bool enable) {
|
||||
m_enableTranslation = enable;
|
||||
}
|
||||
|
||||
// checks whether chat banks contains messages
|
||||
bool hasChatBank (int chatType) const {
|
||||
return !m_chat[chatType].empty ();
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
@ -60,7 +52,7 @@ public:
|
|||
|
||||
// queued text message to prevent overflow with rapid output
|
||||
struct PrintQueue {
|
||||
int32 destination;
|
||||
int32 destination {};
|
||||
String text;
|
||||
|
||||
public:
|
||||
|
|
@ -83,6 +75,7 @@ private:
|
|||
bool m_isFromConsole;
|
||||
bool m_rapidOutput;
|
||||
bool m_isMenuFillCommand;
|
||||
bool m_ignoreTranslate;
|
||||
|
||||
int m_menuServerFillTeam;
|
||||
int m_interMenuData[4] = { 0, };
|
||||
|
|
@ -199,6 +192,10 @@ public:
|
|||
return arg < m_args.length ();
|
||||
}
|
||||
|
||||
bool ignoreTranslate () const {
|
||||
return m_ignoreTranslate;
|
||||
}
|
||||
|
||||
void collectArgs () {
|
||||
m_args.clear ();
|
||||
|
||||
|
|
@ -224,12 +221,8 @@ public:
|
|||
|
||||
// global heloer for sending message to correct channel
|
||||
template <typename ...Args> inline void BotControl::msg (const char *fmt, Args &&...args) {
|
||||
const bool isDedicated = game.isDedicated () && game.isNullEntity (m_ent);
|
||||
m_ignoreTranslate = game.isDedicated () && game.isNullEntity (m_ent);
|
||||
|
||||
// disable translation if we're sending to server console
|
||||
if (isDedicated) {
|
||||
conf.enableTranslation (false);
|
||||
}
|
||||
auto result = strings.format (conf.translate (fmt), cr::forward <Args> (args)...);
|
||||
|
||||
// if no receiver or many message have to appear, just print to server console
|
||||
|
|
@ -241,11 +234,6 @@ template <typename ...Args> inline void BotControl::msg (const char *fmt, Args &
|
|||
else {
|
||||
game.print (result); // print the info
|
||||
}
|
||||
|
||||
// enable translation aftetwards
|
||||
if (isDedicated) {
|
||||
conf.enableTranslation (true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
15
inc/engine.h
15
inc/engine.h
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
@ -314,6 +306,9 @@ public:
|
|||
m_localEntity = ent;
|
||||
}
|
||||
|
||||
// sets player start entity draw models
|
||||
void setPlayerStartDrawModels ();
|
||||
|
||||
// check the engine visibility wrapper
|
||||
bool checkVisibility (edict_t *ent, uint8 *set);
|
||||
|
||||
|
|
|
|||
12
inc/graph.h
12
inc/graph.h
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
@ -90,7 +82,7 @@ private:
|
|||
Array <edict_t *> m_activeGrenades; // holds currently active grenades on the map
|
||||
Array <edict_t *> m_intrestingEntities; // holds currently intresting entities on the map
|
||||
|
||||
SmallArray <BotRequest> m_addRequests; // bot creation tab
|
||||
Deque <BotRequest> m_addRequests; // bot creation tab
|
||||
SmallArray <BotTask> m_filters; // task filters
|
||||
SmallArray <UniqueBot> m_bots; // all available bots
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
@ -38,8 +30,8 @@ public:
|
|||
public:
|
||||
StringRef name { "YaPB" };
|
||||
StringRef year { __DATE__ + 7 };
|
||||
StringRef author { "YaPB Development Team" };
|
||||
StringRef email { "team@yapb.ru" };
|
||||
StringRef author { "YaPB Project" };
|
||||
StringRef email { "yapb@jeefo.net" };
|
||||
StringRef url { "https://yapb.ru/" };
|
||||
StringRef download { "yapb.ru" };
|
||||
StringRef folder { "yapb" };
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
|||
|
|
@ -1,23 +1,15 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
// fallback if no git or custom build
|
||||
#define MODULE_BUILD_HASH "0"
|
||||
#define MODULE_BUILD_AUTHOR "team@yapb.ru"
|
||||
#define MODULE_BUILD_AUTHOR "yapb@jeefo.net"
|
||||
#define MODULE_BUILD_COUNT "0"
|
||||
#define MODULE_BUILD_MACHINE "localhost"
|
||||
#define MODULE_BUILD_COMPILER "unknown"
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
|||
12
inc/yapb.h
12
inc/yapb.h
|
|
@ -1,16 +1,8 @@
|
|||
//
|
||||
// YaPB - Counter-Strike Bot based on PODBot by Markus Klinge.
|
||||
// Copyright © 2004-2020 YaPB Development Team <team@yapb.ru>.
|
||||
// Copyright © 2004-2020 YaPB Project <yapb@jeefo.net>.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue