aim: look at last enemy origin when just loosed focus
fix: saving bot practice took enormous amount of time when changing level on large practice database refactor: changed random number generator usage
This commit is contained in:
parent
8e81eb1c96
commit
3358168fad
27 changed files with 588 additions and 581 deletions
|
|
@ -193,25 +193,25 @@ public:
|
|||
m_printQueueFlushTimestamp = 0.0f;
|
||||
}
|
||||
|
||||
int intValue (size_t arg) const {
|
||||
if (!hasArg (arg)) {
|
||||
return 0;
|
||||
template <typename U> constexpr U arg (const size_t index) const {
|
||||
if constexpr (cr::is_same <U, float>::value) {
|
||||
if (!hasArg (index)) {
|
||||
return 0.0f;
|
||||
}
|
||||
return m_args[index].as <float> ();
|
||||
}
|
||||
return m_args[arg].int_ ();
|
||||
}
|
||||
|
||||
float floatValue (size_t arg) const {
|
||||
if (!hasArg (arg)) {
|
||||
return 0.0f;
|
||||
else if constexpr (cr::is_same <U, int>::value) {
|
||||
if (!hasArg (index)) {
|
||||
return 0;
|
||||
}
|
||||
return m_args[index].as <int> ();
|
||||
}
|
||||
return m_args[arg].float_ ();
|
||||
}
|
||||
|
||||
StringRef strValue (size_t arg) {
|
||||
if (!hasArg (arg)) {
|
||||
return "";
|
||||
else if constexpr (cr::is_same <U, StringRef>::value) {
|
||||
if (!hasArg (index)) {
|
||||
return "";
|
||||
}
|
||||
return m_args[index];
|
||||
}
|
||||
return m_args[arg];
|
||||
}
|
||||
|
||||
bool hasArg (size_t arg) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue