-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbot_manager.cpp
110 lines (102 loc) · 2.52 KB
/
bot_manager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
///////////////////////////////////////////////////////////////////////////////////////////////
//
// -- GNU -- open source
// Please read and agree to the mb_gnu_license.txt file
// (the file is located in the marine_bot source folder)
// before editing or distributing this source code.
// This source code is free for use under the rules of the GNU General Public License.
// For more information goto:: http://www.gnu.org/licenses/
//
// credits to - valve, botman.
//
// Marine Bot - code by Frank McNeil, Kota@, Mav, Shrike.
//
// (http://marinebot.xf.cz)
//
//
// bot_manager.cpp
//
////////////////////////////////////////////////////////////////////////////////////////////////
#if defined(WIN32)
#pragma warning(disable: 4005)
#endif
#include "bot_manager.h"
client_t::client_t()
{
pEntity = nullptr;
client_is_human = false;
client_bleeds = false;
max_speed_time = -1.0;
}
// set all botmanager variables to defaults
botmanager_t::botmanager_t()
{
ResetTeamsBalanceNeeded();
ResetOverrideTeamsBalance();
ResetTimeOfTeamsBalanceCheck();
ResetTeamsBalanceValue();
ResetListenServerFilling();
ResetBotCheckTime();
ResetBotsToBeAdded();
}
// set all botdebugger variables to default values
botdebugger_t::botdebugger_t()
{
ResetObserverMode();
ResetFreezeMode();
ResetDontShoot();
ResetIgnoreAll();
ResetDebugAims();
ResetDebugActions();
ResetDebugCross();
ResetDebugPaths();
ResetDebugStuck();
ResetDebugWaypoints();
ResetDebugWeapons();
}
// what we do here is that we set all external variables to their default values
externals_t::externals_t()
{
ResetIsLogging();
ResetRandomSkill();
ResetSpawnSkill();
ResetReactionTime();
ResetBalanceTime();
ResetMinBots();
ResetMaxBots();
ResetCustomClasses();
ResetInfoTime();
ResetPresentationTime();
ResetDontSpeak();
ResetDontChat();
ResetRichNames();
ResetPassiveHealing();
}
// what we do here is that we set all internal variables to their default values
internals_t::internals_t()
{
ResetIsEnemyDistanceLimit();
ResetEnemyDistanceLimit();
ResetHUDMessageTime();
ResetTeamPlay();
ResetTeamPlayChecked();
ResetFASkillSystem();
ResetSkillSystemChecked();
ResetIsCustomWaypoints();
ResetWaypointsAutoSave();
ResetPathToContinue();
}
// allows setting defaults on map change
void internals_t::ResetOnMapChange()
{
ResetIsEnemyDistanceLimit();
ResetEnemyDistanceLimit();
ResetHUDMessageTime();
ResetTeamPlay();
ResetTeamPlayChecked();
ResetFASkillSystem();
ResetSkillSystemChecked();
ResetIsCustomWaypoints();
ResetWaypointsAutoSave();
ResetPathToContinue();
}