conf: get decal indices during config load
combat: do not init hitbox aiming if disabled nav: reverted some last changes nav: fixed check fall on ladders chat: added %g keyword that is replaced with graph author
This commit is contained in:
parent
7157cf1b2f
commit
ecb1f20303
12 changed files with 79 additions and 106 deletions
|
|
@ -735,19 +735,32 @@ void BotConfig::loadLogosConfig () {
|
|||
String line {};
|
||||
MemFile file {};
|
||||
|
||||
auto addLogoIndex = [&] (StringRef logo) {
|
||||
const auto index = engfuncs.pfnDecalIndex (logo.chars ());
|
||||
|
||||
if (index > 0) {
|
||||
m_logosIndices.push (index);
|
||||
}
|
||||
};
|
||||
m_logosIndices.clear ();
|
||||
|
||||
// logos initialization
|
||||
if (openConfig ("logos", "Logos config file not found. Loading defaults.", &file)) {
|
||||
m_logos.clear ();
|
||||
|
||||
while (file.getLine (line)) {
|
||||
if (isCommentLine (line)) {
|
||||
continue;
|
||||
}
|
||||
m_logos.push (cr::move (line.trim ()));
|
||||
addLogoIndex (line);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_logos = cr::move (String { "{biohaz;{graf003;{graf004;{graf005;{lambda06;{target;{hand1;{spit2;{bloodhand6;{foot_l;{foot_r" }.split (";"));
|
||||
|
||||
// use defaults
|
||||
if (m_logosIndices.empty ()) {
|
||||
auto defaults = String { "{biohaz;{graf003;{graf004;{graf005;{lambda06;{target;{hand1;{spit2;{bloodhand6;{foot_l;{foot_r" }.split (";");
|
||||
|
||||
for (const auto &logo : defaults) {
|
||||
addLogoIndex (logo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue