ci: enable continuous builds for repository
aim: do not add aim errors if too close to enemy conf: do not spam with unknown custom variables if config doesn't define one
This commit is contained in:
parent
ed75a662c9
commit
bcb5b954cb
3 changed files with 66 additions and 6 deletions
|
|
@ -470,7 +470,7 @@ bool Bot::lookupEnemies () {
|
|||
}
|
||||
|
||||
Vector Bot::getBodyOffsetError (float distance) {
|
||||
if (game.isNullEntity (m_enemy) || distance < kSprayDistance) {
|
||||
if (game.isNullEntity (m_enemy) || distance < kDoubleSprayDistance) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -649,14 +649,20 @@ void BotConfig::loadCustomConfig () {
|
|||
String line;
|
||||
MemFile file;
|
||||
|
||||
m_custom["C4ModelName"] = "c4.mdl";
|
||||
m_custom["AMXParachuteCvar"] = "sv_parachute";
|
||||
m_custom["CustomCSDMSpawnPoint"] = "view_spawn";
|
||||
auto setDefaults = [&] () {
|
||||
m_custom["C4ModelName"] = "c4.mdl";
|
||||
m_custom["AMXParachuteCvar"] = "sv_parachute";
|
||||
m_custom["CustomCSDMSpawnPoint"] = "view_spawn";
|
||||
};
|
||||
setDefaults ();
|
||||
|
||||
// custom initialization
|
||||
if (openConfig ("custom", "Custom config file not found. Loading defaults.", &file)) {
|
||||
m_custom.clear ();
|
||||
|
||||
// set defaults anyway
|
||||
setDefaults ();
|
||||
|
||||
while (file.getLine (line)) {
|
||||
line.trim ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue